Skip to content

Commit

Permalink
Merge pull request #144 from kitasuke/adapt_visibility_option_to_prop…
Browse files Browse the repository at this point in the history
…erty_and_function

Update access control for fields and methods to match the enclosing struct/enum.
  • Loading branch information
tbkka committed Nov 29, 2016
2 parents e0475bb + 2121c70 commit fa74ba7
Show file tree
Hide file tree
Showing 109 changed files with 11,696 additions and 11,694 deletions.
310 changes: 155 additions & 155 deletions Reference/conformance/conformance.pb.swift

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Reference/google/protobuf/any.pb.swift
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,12 @@ struct Google_Protobuf_Any: ProtobufGeneratedMessage, ProtobufProto3Message {
///
/// Schemes other than `http`, `https` (or the empty scheme) might be
/// used with implementation specific semantics.
public var typeURL: String = ""
var typeURL: String = ""

/// Must be a valid serialized protocol buffer of the above specified type.
public var value: Data = Data()
var value: Data = Data()

public init() {}
init() {}

public mutating func _protoc_generated_decodeField(setter: inout ProtobufFieldDecoder, protoFieldNumber: Int) throws {
switch protoFieldNumber {
Expand Down
8 changes: 4 additions & 4 deletions Reference/google/protobuf/any_test.pb.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ struct ProtobufUnittest_TestAny: ProtobufGeneratedMessage, ProtobufProto3Message
private var _storage = _StorageClass()


public var int32Value: Int32 {
var int32Value: Int32 {
get {return _storage._int32Value}
set {_uniqueStorage()._int32Value = newValue}
}

public var anyValue: Google_Protobuf_Any {
var anyValue: Google_Protobuf_Any {
get {return _storage._anyValue ?? Google_Protobuf_Any()}
set {_uniqueStorage()._anyValue = newValue}
}
Expand All @@ -119,12 +119,12 @@ struct ProtobufUnittest_TestAny: ProtobufGeneratedMessage, ProtobufProto3Message
return _storage._anyValue = nil
}

public var repeatedAnyValue: [Google_Protobuf_Any] {
var repeatedAnyValue: [Google_Protobuf_Any] {
get {return _storage._repeatedAnyValue}
set {_uniqueStorage()._repeatedAnyValue = newValue}
}

public init() {}
init() {}

public mutating func _protoc_generated_decodeField(setter: inout ProtobufFieldDecoder, protoFieldNumber: Int) throws {
try _uniqueStorage().decodeField(setter: &setter, protoFieldNumber: protoFieldNumber)
Expand Down
38 changes: 19 additions & 19 deletions Reference/google/protobuf/api.pb.swift
Original file line number Diff line number Diff line change
Expand Up @@ -141,19 +141,19 @@ struct Google_Protobuf_Api: ProtobufGeneratedMessage, ProtobufProto3Message {

/// The fully qualified name of this api, including package name
/// followed by the api's simple name.
public var name: String {
var name: String {
get {return _storage._name}
set {_uniqueStorage()._name = newValue}
}

/// The methods of this api, in unspecified order.
public var methods: [Google_Protobuf_Method] {
var methods: [Google_Protobuf_Method] {
get {return _storage._methods}
set {_uniqueStorage()._methods = newValue}
}

/// Any metadata attached to the API.
public var options: [Google_Protobuf_Option] {
var options: [Google_Protobuf_Option] {
get {return _storage._options}
set {_uniqueStorage()._options = newValue}
}
Expand All @@ -178,14 +178,14 @@ struct Google_Protobuf_Api: ProtobufGeneratedMessage, ProtobufProto3Message {
/// `google.feature.v1`. For major versions 0 and 1, the suffix can
/// be omitted. Zero major versions must only be used for
/// experimental, none-GA apis.
public var version: String {
var version: String {
get {return _storage._version}
set {_uniqueStorage()._version = newValue}
}

/// Source context for the protocol buffer service represented by this
/// message.
public var sourceContext: Google_Protobuf_SourceContext {
var sourceContext: Google_Protobuf_SourceContext {
get {return _storage._sourceContext ?? Google_Protobuf_SourceContext()}
set {_uniqueStorage()._sourceContext = newValue}
}
Expand All @@ -197,18 +197,18 @@ struct Google_Protobuf_Api: ProtobufGeneratedMessage, ProtobufProto3Message {
}

/// Included APIs. See [Mixin][].
public var mixins: [Google_Protobuf_Mixin] {
var mixins: [Google_Protobuf_Mixin] {
get {return _storage._mixins}
set {_uniqueStorage()._mixins = newValue}
}

/// The source syntax of the service.
public var syntax: Google_Protobuf_Syntax {
var syntax: Google_Protobuf_Syntax {
get {return _storage._syntax}
set {_uniqueStorage()._syntax = newValue}
}

public init() {}
init() {}

public mutating func _protoc_generated_decodeField(setter: inout ProtobufFieldDecoder, protoFieldNumber: Int) throws {
try _uniqueStorage().decodeField(setter: &setter, protoFieldNumber: protoFieldNumber)
Expand Down Expand Up @@ -256,27 +256,27 @@ struct Google_Protobuf_Method: ProtobufGeneratedMessage, ProtobufProto3Message {


/// The simple name of this method.
public var name: String = ""
var name: String = ""

/// A URL of the input message type.
public var requestTypeURL: String = ""
var requestTypeURL: String = ""

/// If true, the request is streamed.
public var requestStreaming: Bool = false
var requestStreaming: Bool = false

/// The URL of the output message type.
public var responseTypeURL: String = ""
var responseTypeURL: String = ""

/// If true, the response is streamed.
public var responseStreaming: Bool = false
var responseStreaming: Bool = false

/// Any metadata attached to the method.
public var options: [Google_Protobuf_Option] = []
var options: [Google_Protobuf_Option] = []

/// The source syntax of this method.
public var syntax: Google_Protobuf_Syntax = Google_Protobuf_Syntax.proto2
var syntax: Google_Protobuf_Syntax = Google_Protobuf_Syntax.proto2

public init() {}
init() {}

public mutating func _protoc_generated_decodeField(setter: inout ProtobufFieldDecoder, protoFieldNumber: Int) throws {
switch protoFieldNumber {
Expand Down Expand Up @@ -419,13 +419,13 @@ struct Google_Protobuf_Mixin: ProtobufGeneratedMessage, ProtobufProto3Message {


/// The fully qualified name of the API which is included.
public var name: String = ""
var name: String = ""

/// If non-empty specifies a path under which inherited HTTP paths
/// are rooted.
public var root: String = ""
var root: String = ""

public init() {}
init() {}

public mutating func _protoc_generated_decodeField(setter: inout ProtobufFieldDecoder, protoFieldNumber: Int) throws {
switch protoFieldNumber {
Expand Down
22 changes: 11 additions & 11 deletions Reference/google/protobuf/compiler/plugin.pb.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ struct Google_Protobuf_Compiler_CodeGeneratorRequest: ProtobufGeneratedMessage,
/// The .proto files that were explicitly listed on the command-line. The
/// code generator should generate code only for these files. Each file's
/// descriptor will be included in proto_file, below.
public var fileToGenerate: [String] = []
var fileToGenerate: [String] = []

/// The generator parameter passed on the command-line.
private var _parameter: String? = nil
public var parameter: String {
var parameter: String {
get {return _parameter ?? ""}
set {_parameter = newValue}
}
Expand All @@ -103,9 +103,9 @@ struct Google_Protobuf_Compiler_CodeGeneratorRequest: ProtobufGeneratedMessage,
/// the entire set into memory at once. However, as of this writing, this
/// is not similarly optimized on protoc's end -- it will store all fields in
/// memory at once before sending them to the plugin.
public var protoFile: [Google_Protobuf_FileDescriptorProto] = []
var protoFile: [Google_Protobuf_FileDescriptorProto] = []

public init() {}
init() {}

public mutating func _protoc_generated_decodeField(setter: inout ProtobufFieldDecoder, protoFieldNumber: Int) throws {
switch protoFieldNumber {
Expand Down Expand Up @@ -184,7 +184,7 @@ struct Google_Protobuf_Compiler_CodeGeneratorResponse: ProtobufGeneratedMessage,
/// this writing protoc does not optimize for this -- it will read the entire
/// CodeGeneratorResponse before writing files to disk.
private var _name: String? = nil
public var name: String {
var name: String {
get {return _name ?? ""}
set {_name = newValue}
}
Expand Down Expand Up @@ -233,7 +233,7 @@ struct Google_Protobuf_Compiler_CodeGeneratorResponse: ProtobufGeneratedMessage,
///
/// If |insertion_point| is present, |name| must also be present.
private var _insertionPoint: String? = nil
public var insertionPoint: String {
var insertionPoint: String {
get {return _insertionPoint ?? ""}
set {_insertionPoint = newValue}
}
Expand All @@ -246,7 +246,7 @@ struct Google_Protobuf_Compiler_CodeGeneratorResponse: ProtobufGeneratedMessage,

/// The file contents.
private var _content: String? = nil
public var content: String {
var content: String {
get {return _content ?? ""}
set {_content = newValue}
}
Expand All @@ -257,7 +257,7 @@ struct Google_Protobuf_Compiler_CodeGeneratorResponse: ProtobufGeneratedMessage,
return _content = nil
}

public init() {}
init() {}

public mutating func _protoc_generated_decodeField(setter: inout ProtobufFieldDecoder, protoFieldNumber: Int) throws {
switch protoFieldNumber {
Expand Down Expand Up @@ -299,7 +299,7 @@ struct Google_Protobuf_Compiler_CodeGeneratorResponse: ProtobufGeneratedMessage,
/// unparseable -- should be reported by writing a message to stderr and
/// exiting with a non-zero status code.
private var _error: String? = nil
public var error: String {
var error: String {
get {return _error ?? ""}
set {_error = newValue}
}
Expand All @@ -310,9 +310,9 @@ struct Google_Protobuf_Compiler_CodeGeneratorResponse: ProtobufGeneratedMessage,
return _error = nil
}

public var file: [Google_Protobuf_Compiler_CodeGeneratorResponse.File] = []
var file: [Google_Protobuf_Compiler_CodeGeneratorResponse.File] = []

public init() {}
init() {}

public mutating func _protoc_generated_decodeField(setter: inout ProtobufFieldDecoder, protoFieldNumber: Int) throws {
switch protoFieldNumber {
Expand Down

0 comments on commit fa74ba7

Please sign in to comment.