diff --git a/java-functions/README.md b/java-functions/README.md index 01c5773f8712..e6022e4a6c0d 100644 --- a/java-functions/README.md +++ b/java-functions/README.md @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-functions - 2.5.2 + 2.5.3 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-functions:2.5.2' +implementation 'com.google.cloud:google-cloud-functions:2.5.3' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-functions" % "2.5.2" +libraryDependencies += "com.google.cloud" % "google-cloud-functions" % "2.5.3" ``` ## Authentication diff --git a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CallFunctionRequest.java b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CallFunctionRequest.java index 243447345dde..90820432a742 100644 --- a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CallFunctionRequest.java +++ b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CallFunctionRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CallFunctionRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - data_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v1.FunctionsProto .internal_static_google_cloud_functions_v1_CallFunctionRequest_descriptor; @@ -243,7 +190,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(data_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, data_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -258,7 +205,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(data_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, data_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -276,7 +223,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!getData().equals(other.getData())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -291,7 +238,7 @@ public int hashCode() { hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + DATA_FIELD_NUMBER; hash = (53 * hash) + getData().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -420,17 +367,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v1.CallFunctionRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -527,7 +467,7 @@ public Builder mergeFrom(com.google.cloud.functions.v1.CallFunctionRequest other data_ = other.data_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -542,18 +482,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v1.CallFunctionRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + data_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v1.CallFunctionRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -811,7 +776,18 @@ public CallFunctionRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CallFunctionRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CallFunctionResponse.java b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CallFunctionResponse.java index 34c0537bcbb9..030d93897263 100644 --- a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CallFunctionResponse.java +++ b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CallFunctionResponse.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CallFunctionResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - executionId_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - result_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - error_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v1.FunctionsProto .internal_static_google_cloud_functions_v1_CallFunctionResponse_descriptor; @@ -303,7 +243,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(error_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, error_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -321,7 +261,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(error_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, error_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -340,7 +280,7 @@ public boolean equals(final java.lang.Object obj) { if (!getExecutionId().equals(other.getExecutionId())) return false; if (!getResult().equals(other.getResult())) return false; if (!getError().equals(other.getError())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -357,7 +297,7 @@ public int hashCode() { hash = (53 * hash) + getResult().hashCode(); hash = (37 * hash) + ERROR_FIELD_NUMBER; hash = (53 * hash) + getError().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -486,17 +426,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v1.CallFunctionResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -600,7 +533,7 @@ public Builder mergeFrom(com.google.cloud.functions.v1.CallFunctionResponse othe error_ = other.error_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -615,18 +548,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v1.CallFunctionResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + executionId_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + result_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + error_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v1.CallFunctionResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -990,7 +954,18 @@ public CallFunctionResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CallFunctionResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CloudFunction.java b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CloudFunction.java index bcb223dac6cb..e183b1100e86 100644 --- a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CloudFunction.java +++ b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CloudFunction.java @@ -71,360 +71,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CloudFunction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - sourceCodeCase_ = 3; - sourceCode_ = s; - break; - } - case 34: - { - com.google.cloud.functions.v1.SourceRepository.Builder subBuilder = null; - if (sourceCodeCase_ == 4) { - subBuilder = - ((com.google.cloud.functions.v1.SourceRepository) sourceCode_).toBuilder(); - } - sourceCode_ = - input.readMessage( - com.google.cloud.functions.v1.SourceRepository.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.functions.v1.SourceRepository) sourceCode_); - sourceCode_ = subBuilder.buildPartial(); - } - sourceCodeCase_ = 4; - break; - } - case 42: - { - com.google.cloud.functions.v1.HttpsTrigger.Builder subBuilder = null; - if (triggerCase_ == 5) { - subBuilder = ((com.google.cloud.functions.v1.HttpsTrigger) trigger_).toBuilder(); - } - trigger_ = - input.readMessage( - com.google.cloud.functions.v1.HttpsTrigger.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.functions.v1.HttpsTrigger) trigger_); - trigger_ = subBuilder.buildPartial(); - } - triggerCase_ = 5; - break; - } - case 50: - { - com.google.cloud.functions.v1.EventTrigger.Builder subBuilder = null; - if (triggerCase_ == 6) { - subBuilder = ((com.google.cloud.functions.v1.EventTrigger) trigger_).toBuilder(); - } - trigger_ = - input.readMessage( - com.google.cloud.functions.v1.EventTrigger.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.functions.v1.EventTrigger) trigger_); - trigger_ = subBuilder.buildPartial(); - } - triggerCase_ = 6; - break; - } - case 56: - { - int rawValue = input.readEnum(); - - status_ = rawValue; - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - - entryPoint_ = s; - break; - } - case 74: - { - com.google.protobuf.Duration.Builder subBuilder = null; - if (timeout_ != null) { - subBuilder = timeout_.toBuilder(); - } - timeout_ = - input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(timeout_); - timeout_ = subBuilder.buildPartial(); - } - - break; - } - case 80: - { - availableMemoryMb_ = input.readInt32(); - break; - } - case 90: - { - java.lang.String s = input.readStringRequireUtf8(); - - serviceAccountEmail_ = s; - break; - } - case 98: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 112: - { - versionId_ = input.readInt64(); - break; - } - case 122: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - break; - } - case 130: - { - java.lang.String s = input.readStringRequireUtf8(); - sourceCodeCase_ = 16; - sourceCode_ = s; - break; - } - case 138: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - environmentVariables_ = - com.google.protobuf.MapField.newMapField( - EnvironmentVariablesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry - environmentVariables__ = - input.readMessage( - EnvironmentVariablesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - environmentVariables_ - .getMutableMap() - .put(environmentVariables__.getKey(), environmentVariables__.getValue()); - break; - } - case 146: - { - java.lang.String s = input.readStringRequireUtf8(); - - network_ = s; - break; - } - case 154: - { - java.lang.String s = input.readStringRequireUtf8(); - - runtime_ = s; - break; - } - case 160: - { - maxInstances_ = input.readInt32(); - break; - } - case 178: - { - java.lang.String s = input.readStringRequireUtf8(); - - vpcConnector_ = s; - break; - } - case 184: - { - int rawValue = input.readEnum(); - - vpcConnectorEgressSettings_ = rawValue; - break; - } - case 192: - { - int rawValue = input.readEnum(); - - ingressSettings_ = rawValue; - break; - } - case 202: - { - java.lang.String s = input.readStringRequireUtf8(); - - kmsKeyName_ = s; - break; - } - case 210: - { - java.lang.String s = input.readStringRequireUtf8(); - - buildWorkerPool_ = s; - break; - } - case 218: - { - java.lang.String s = input.readStringRequireUtf8(); - - buildId_ = s; - break; - } - case 226: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - buildEnvironmentVariables_ = - com.google.protobuf.MapField.newMapField( - BuildEnvironmentVariablesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000004; - } - com.google.protobuf.MapEntry - buildEnvironmentVariables__ = - input.readMessage( - BuildEnvironmentVariablesDefaultEntryHolder.defaultEntry - .getParserForType(), - extensionRegistry); - buildEnvironmentVariables_ - .getMutableMap() - .put( - buildEnvironmentVariables__.getKey(), buildEnvironmentVariables__.getValue()); - break; - } - case 234: - { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - secretEnvironmentVariables_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - secretEnvironmentVariables_.add( - input.readMessage( - com.google.cloud.functions.v1.SecretEnvVar.parser(), extensionRegistry)); - break; - } - case 242: - { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - secretVolumes_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - secretVolumes_.add( - input.readMessage( - com.google.cloud.functions.v1.SecretVolume.parser(), extensionRegistry)); - break; - } - case 250: - { - java.lang.String s = input.readStringRequireUtf8(); - - sourceToken_ = s; - break; - } - case 256: - { - minInstances_ = input.readInt32(); - break; - } - case 266: - { - java.lang.String s = input.readStringRequireUtf8(); - - buildName_ = s; - break; - } - case 274: - { - java.lang.String s = input.readStringRequireUtf8(); - - dockerRepository_ = s; - break; - } - case 280: - { - int rawValue = input.readEnum(); - - dockerRegistry_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000008) != 0)) { - secretEnvironmentVariables_ = - java.util.Collections.unmodifiableList(secretEnvironmentVariables_); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - secretVolumes_ = java.util.Collections.unmodifiableList(secretVolumes_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v1.FunctionsProto .internal_static_google_cloud_functions_v1_CloudFunction_descriptor; @@ -3096,7 +2742,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(35, dockerRegistry_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3244,7 +2890,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(35, dockerRegistry_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3322,7 +2968,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3431,7 +3077,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3589,20 +3235,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.functions.v1.CloudFunction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getSecretEnvironmentVariablesFieldBuilder(); - getSecretVolumesFieldBuilder(); - } } @java.lang.Override @@ -3612,6 +3248,15 @@ public Builder clear() { description_ = ""; + if (sourceRepositoryBuilder_ != null) { + sourceRepositoryBuilder_.clear(); + } + if (httpsTriggerBuilder_ != null) { + httpsTriggerBuilder_.clear(); + } + if (eventTriggerBuilder_ != null) { + eventTriggerBuilder_.clear(); + } status_ = 0; entryPoint_ = ""; @@ -3661,16 +3306,18 @@ public Builder clear() { if (secretEnvironmentVariablesBuilder_ == null) { secretEnvironmentVariables_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); } else { + secretEnvironmentVariables_ = null; secretEnvironmentVariablesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000008); if (secretVolumesBuilder_ == null) { secretVolumes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); } else { + secretVolumes_ = null; secretVolumesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000010); sourceToken_ = ""; dockerRepository_ = ""; @@ -4024,7 +3671,7 @@ public Builder mergeFrom(com.google.cloud.functions.v1.CloudFunction other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4039,17 +3686,266 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v1.CloudFunction parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + sourceCodeCase_ = 3; + sourceCode_ = s; + break; + } // case 26 + case 34: + { + input.readMessage( + getSourceRepositoryFieldBuilder().getBuilder(), extensionRegistry); + sourceCodeCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage(getHttpsTriggerFieldBuilder().getBuilder(), extensionRegistry); + triggerCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage(getEventTriggerFieldBuilder().getBuilder(), extensionRegistry); + triggerCase_ = 6; + break; + } // case 50 + case 56: + { + status_ = input.readEnum(); + + break; + } // case 56 + case 66: + { + entryPoint_ = input.readStringRequireUtf8(); + + break; + } // case 66 + case 74: + { + input.readMessage(getTimeoutFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 74 + case 80: + { + availableMemoryMb_ = input.readInt32(); + + break; + } // case 80 + case 90: + { + serviceAccountEmail_ = input.readStringRequireUtf8(); + + break; + } // case 90 + case 98: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 98 + case 112: + { + versionId_ = input.readInt64(); + + break; + } // case 112 + case 122: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 122 + case 130: + { + java.lang.String s = input.readStringRequireUtf8(); + sourceCodeCase_ = 16; + sourceCode_ = s; + break; + } // case 130 + case 138: + { + com.google.protobuf.MapEntry + environmentVariables__ = + input.readMessage( + EnvironmentVariablesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableEnvironmentVariables() + .getMutableMap() + .put(environmentVariables__.getKey(), environmentVariables__.getValue()); + break; + } // case 138 + case 146: + { + network_ = input.readStringRequireUtf8(); + + break; + } // case 146 + case 154: + { + runtime_ = input.readStringRequireUtf8(); + + break; + } // case 154 + case 160: + { + maxInstances_ = input.readInt32(); + + break; + } // case 160 + case 178: + { + vpcConnector_ = input.readStringRequireUtf8(); + + break; + } // case 178 + case 184: + { + vpcConnectorEgressSettings_ = input.readEnum(); + + break; + } // case 184 + case 192: + { + ingressSettings_ = input.readEnum(); + + break; + } // case 192 + case 202: + { + kmsKeyName_ = input.readStringRequireUtf8(); + + break; + } // case 202 + case 210: + { + buildWorkerPool_ = input.readStringRequireUtf8(); + + break; + } // case 210 + case 218: + { + buildId_ = input.readStringRequireUtf8(); + + break; + } // case 218 + case 226: + { + com.google.protobuf.MapEntry + buildEnvironmentVariables__ = + input.readMessage( + BuildEnvironmentVariablesDefaultEntryHolder.defaultEntry + .getParserForType(), + extensionRegistry); + internalGetMutableBuildEnvironmentVariables() + .getMutableMap() + .put( + buildEnvironmentVariables__.getKey(), + buildEnvironmentVariables__.getValue()); + break; + } // case 226 + case 234: + { + com.google.cloud.functions.v1.SecretEnvVar m = + input.readMessage( + com.google.cloud.functions.v1.SecretEnvVar.parser(), extensionRegistry); + if (secretEnvironmentVariablesBuilder_ == null) { + ensureSecretEnvironmentVariablesIsMutable(); + secretEnvironmentVariables_.add(m); + } else { + secretEnvironmentVariablesBuilder_.addMessage(m); + } + break; + } // case 234 + case 242: + { + com.google.cloud.functions.v1.SecretVolume m = + input.readMessage( + com.google.cloud.functions.v1.SecretVolume.parser(), extensionRegistry); + if (secretVolumesBuilder_ == null) { + ensureSecretVolumesIsMutable(); + secretVolumes_.add(m); + } else { + secretVolumesBuilder_.addMessage(m); + } + break; + } // case 242 + case 250: + { + sourceToken_ = input.readStringRequireUtf8(); + + break; + } // case 250 + case 256: + { + minInstances_ = input.readInt32(); + + break; + } // case 256 + case 266: + { + buildName_ = input.readStringRequireUtf8(); + + break; + } // case 266 + case 274: + { + dockerRepository_ = input.readStringRequireUtf8(); + + break; + } // case 274 + case 280: + { + dockerRegistry_ = input.readEnum(); + + break; + } // case 280 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v1.CloudFunction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -9098,7 +8994,18 @@ public CloudFunction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CloudFunction(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CreateFunctionRequest.java b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CreateFunctionRequest.java index 4524013c3ceb..4c0d7c27e823 100644 --- a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CreateFunctionRequest.java +++ b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CreateFunctionRequest.java @@ -52,68 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateFunctionRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - location_ = s; - break; - } - case 18: - { - com.google.cloud.functions.v1.CloudFunction.Builder subBuilder = null; - if (function_ != null) { - subBuilder = function_.toBuilder(); - } - function_ = - input.readMessage( - com.google.cloud.functions.v1.CloudFunction.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(function_); - function_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v1.FunctionsProto .internal_static_google_cloud_functions_v1_CreateFunctionRequest_descriptor; @@ -258,7 +196,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (function_ != null) { output.writeMessage(2, getFunction()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -273,7 +211,7 @@ public int getSerializedSize() { if (function_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getFunction()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -294,7 +232,7 @@ public boolean equals(final java.lang.Object obj) { if (hasFunction()) { if (!getFunction().equals(other.getFunction())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -311,7 +249,7 @@ public int hashCode() { hash = (37 * hash) + FUNCTION_FIELD_NUMBER; hash = (53 * hash) + getFunction().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -440,17 +378,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v1.CreateFunctionRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -554,7 +485,7 @@ public Builder mergeFrom(com.google.cloud.functions.v1.CreateFunctionRequest oth if (other.hasFunction()) { mergeFunction(other.getFunction()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -569,18 +500,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v1.CreateFunctionRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + location_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getFunctionFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v1.CreateFunctionRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -941,7 +897,18 @@ public CreateFunctionRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateFunctionRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/DeleteFunctionRequest.java b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/DeleteFunctionRequest.java index 4367a1950c29..ea28552c4762 100644 --- a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/DeleteFunctionRequest.java +++ b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/DeleteFunctionRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteFunctionRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v1.FunctionsProto .internal_static_google_cloud_functions_v1_DeleteFunctionRequest_descriptor; @@ -183,7 +137,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -195,7 +149,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -212,7 +166,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.functions.v1.DeleteFunctionRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -225,7 +179,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -354,17 +308,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v1.DeleteFunctionRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -454,7 +401,7 @@ public Builder mergeFrom(com.google.cloud.functions.v1.DeleteFunctionRequest oth name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -469,18 +416,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v1.DeleteFunctionRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v1.DeleteFunctionRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -632,7 +598,18 @@ public DeleteFunctionRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteFunctionRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/EventTrigger.java b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/EventTrigger.java index a68d9845a6dc..5ce58553d72b 100644 --- a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/EventTrigger.java +++ b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/EventTrigger.java @@ -55,82 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private EventTrigger( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - eventType_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - service_ = s; - break; - } - case 42: - { - com.google.cloud.functions.v1.FailurePolicy.Builder subBuilder = null; - if (failurePolicy_ != null) { - subBuilder = failurePolicy_.toBuilder(); - } - failurePolicy_ = - input.readMessage( - com.google.cloud.functions.v1.FailurePolicy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(failurePolicy_); - failurePolicy_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v1.FunctionsProto .internal_static_google_cloud_functions_v1_EventTrigger_descriptor; @@ -423,7 +347,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (failurePolicy_ != null) { output.writeMessage(5, getFailurePolicy()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -444,7 +368,7 @@ public int getSerializedSize() { if (failurePolicy_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getFailurePolicy()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -467,7 +391,7 @@ public boolean equals(final java.lang.Object obj) { if (hasFailurePolicy()) { if (!getFailurePolicy().equals(other.getFailurePolicy())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -488,7 +412,7 @@ public int hashCode() { hash = (37 * hash) + FAILURE_POLICY_FIELD_NUMBER; hash = (53 * hash) + getFailurePolicy().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -618,17 +542,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v1.EventTrigger.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -745,7 +662,7 @@ public Builder mergeFrom(com.google.cloud.functions.v1.EventTrigger other) { if (other.hasFailurePolicy()) { mergeFailurePolicy(other.getFailurePolicy()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -760,17 +677,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v1.EventTrigger parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + eventType_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + service_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 42: + { + input.readMessage(getFailurePolicyFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v1.EventTrigger) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1450,7 +1405,18 @@ public EventTrigger parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new EventTrigger(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/FailurePolicy.java b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/FailurePolicy.java index aa52cb702ba5..5d7e34e15a20 100644 --- a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/FailurePolicy.java +++ b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/FailurePolicy.java @@ -51,63 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FailurePolicy( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.functions.v1.FailurePolicy.Retry.Builder subBuilder = null; - if (actionCase_ == 1) { - subBuilder = - ((com.google.cloud.functions.v1.FailurePolicy.Retry) action_).toBuilder(); - } - action_ = - input.readMessage( - com.google.cloud.functions.v1.FailurePolicy.Retry.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.functions.v1.FailurePolicy.Retry) action_); - action_ = subBuilder.buildPartial(); - } - actionCase_ = 1; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v1.FunctionsProto .internal_static_google_cloud_functions_v1_FailurePolicy_descriptor; @@ -163,45 +106,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Retry( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v1.FunctionsProto .internal_static_google_cloud_functions_v1_FailurePolicy_Retry_descriptor; @@ -231,7 +135,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -240,7 +144,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -256,7 +160,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.functions.v1.FailurePolicy.Retry other = (com.google.cloud.functions.v1.FailurePolicy.Retry) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -267,7 +171,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -402,17 +306,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v1.FailurePolicy.Retry.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -497,7 +394,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.functions.v1.FailurePolicy.Retry other) { if (other == com.google.cloud.functions.v1.FailurePolicy.Retry.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -512,18 +409,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v1.FailurePolicy.Retry parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v1.FailurePolicy.Retry) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -560,7 +470,19 @@ public Retry parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Retry(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -691,7 +613,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (actionCase_ == 1) { output.writeMessage(1, (com.google.cloud.functions.v1.FailurePolicy.Retry) action_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -705,7 +627,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 1, (com.google.cloud.functions.v1.FailurePolicy.Retry) action_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -729,7 +651,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -748,7 +670,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -878,22 +800,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v1.FailurePolicy.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); + if (retryBuilder_ != null) { + retryBuilder_.clear(); + } actionCase_ = 0; action_ = null; return this; @@ -991,7 +909,7 @@ public Builder mergeFrom(com.google.cloud.functions.v1.FailurePolicy other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1006,17 +924,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v1.FailurePolicy parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getRetryFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 1; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v1.FailurePolicy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1276,7 +1214,18 @@ public FailurePolicy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FailurePolicy(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GenerateDownloadUrlRequest.java b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GenerateDownloadUrlRequest.java index 6d2617ce9c7c..4990917df7b1 100644 --- a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GenerateDownloadUrlRequest.java +++ b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GenerateDownloadUrlRequest.java @@ -52,57 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GenerateDownloadUrlRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 16: - { - versionId_ = input.readUInt64(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v1.FunctionsProto .internal_static_google_cloud_functions_v1_GenerateDownloadUrlRequest_descriptor; @@ -208,7 +157,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (versionId_ != 0L) { output.writeUInt64(2, versionId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -223,7 +172,7 @@ public int getSerializedSize() { if (versionId_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeUInt64Size(2, versionId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -241,7 +190,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (getVersionId() != other.getVersionId()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -256,7 +205,7 @@ public int hashCode() { hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + VERSION_ID_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getVersionId()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -386,17 +335,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v1.GenerateDownloadUrlRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -492,7 +434,7 @@ public Builder mergeFrom(com.google.cloud.functions.v1.GenerateDownloadUrlReques if (other.getVersionId() != 0L) { setVersionId(other.getVersionId()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -507,18 +449,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v1.GenerateDownloadUrlRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + versionId_ = input.readUInt64(); + + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v1.GenerateDownloadUrlRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -720,7 +687,18 @@ public GenerateDownloadUrlRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GenerateDownloadUrlRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GenerateDownloadUrlResponse.java b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GenerateDownloadUrlResponse.java index 81310f6dc737..9867ef853670 100644 --- a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GenerateDownloadUrlResponse.java +++ b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GenerateDownloadUrlResponse.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GenerateDownloadUrlResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - downloadUrl_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v1.FunctionsProto .internal_static_google_cloud_functions_v1_GenerateDownloadUrlResponse_descriptor; @@ -181,7 +135,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(downloadUrl_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, downloadUrl_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -193,7 +147,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(downloadUrl_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, downloadUrl_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -210,7 +164,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.functions.v1.GenerateDownloadUrlResponse) obj; if (!getDownloadUrl().equals(other.getDownloadUrl())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -223,7 +177,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + DOWNLOAD_URL_FIELD_NUMBER; hash = (53 * hash) + getDownloadUrl().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -353,17 +307,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v1.GenerateDownloadUrlResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -453,7 +400,7 @@ public Builder mergeFrom(com.google.cloud.functions.v1.GenerateDownloadUrlRespon downloadUrl_ = other.downloadUrl_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -468,18 +415,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v1.GenerateDownloadUrlResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + downloadUrl_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v1.GenerateDownloadUrlResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -626,7 +592,18 @@ public GenerateDownloadUrlResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GenerateDownloadUrlResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GenerateUploadUrlRequest.java b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GenerateUploadUrlRequest.java index acb370b5bca7..727f212b4272 100644 --- a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GenerateUploadUrlRequest.java +++ b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GenerateUploadUrlRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GenerateUploadUrlRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - kmsKeyName_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v1.FunctionsProto .internal_static_google_cloud_functions_v1_GenerateUploadUrlRequest_descriptor; @@ -269,7 +216,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, kmsKeyName_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -284,7 +231,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, kmsKeyName_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -302,7 +249,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (!getKmsKeyName().equals(other.getKmsKeyName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -317,7 +264,7 @@ public int hashCode() { hash = (53 * hash) + getParent().hashCode(); hash = (37 * hash) + KMS_KEY_NAME_FIELD_NUMBER; hash = (53 * hash) + getKmsKeyName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -447,17 +394,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v1.GenerateUploadUrlRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -554,7 +494,7 @@ public Builder mergeFrom(com.google.cloud.functions.v1.GenerateUploadUrlRequest kmsKeyName_ = other.kmsKeyName_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -569,18 +509,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v1.GenerateUploadUrlRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + kmsKeyName_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v1.GenerateUploadUrlRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -903,7 +868,18 @@ public GenerateUploadUrlRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GenerateUploadUrlRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GenerateUploadUrlResponse.java b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GenerateUploadUrlResponse.java index cd64f9e92195..bb2f4f40b5fa 100644 --- a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GenerateUploadUrlResponse.java +++ b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GenerateUploadUrlResponse.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GenerateUploadUrlResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - uploadUrl_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v1.FunctionsProto .internal_static_google_cloud_functions_v1_GenerateUploadUrlResponse_descriptor; @@ -183,7 +137,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uploadUrl_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uploadUrl_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -195,7 +149,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uploadUrl_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uploadUrl_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -212,7 +166,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.functions.v1.GenerateUploadUrlResponse) obj; if (!getUploadUrl().equals(other.getUploadUrl())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -225,7 +179,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + UPLOAD_URL_FIELD_NUMBER; hash = (53 * hash) + getUploadUrl().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -355,17 +309,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v1.GenerateUploadUrlResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -455,7 +402,7 @@ public Builder mergeFrom(com.google.cloud.functions.v1.GenerateUploadUrlResponse uploadUrl_ = other.uploadUrl_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -470,18 +417,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v1.GenerateUploadUrlResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + uploadUrl_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v1.GenerateUploadUrlResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -633,7 +599,18 @@ public GenerateUploadUrlResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GenerateUploadUrlResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GetFunctionRequest.java b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GetFunctionRequest.java index bb09005c42a6..f19846f2e1fd 100644 --- a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GetFunctionRequest.java +++ b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GetFunctionRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetFunctionRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v1.FunctionsProto .internal_static_google_cloud_functions_v1_GetFunctionRequest_descriptor; @@ -183,7 +137,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -195,7 +149,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -212,7 +166,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.functions.v1.GetFunctionRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -225,7 +179,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -354,17 +308,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v1.GetFunctionRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -454,7 +401,7 @@ public Builder mergeFrom(com.google.cloud.functions.v1.GetFunctionRequest other) name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -469,17 +416,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v1.GetFunctionRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v1.GetFunctionRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -631,7 +598,18 @@ public GetFunctionRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetFunctionRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/HttpsTrigger.java b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/HttpsTrigger.java index 523b34a75094..dcf9fe67bb95 100644 --- a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/HttpsTrigger.java +++ b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/HttpsTrigger.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private HttpsTrigger( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - url_ = s; - break; - } - case 16: - { - int rawValue = input.readEnum(); - - securityLevel_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v1.FunctionsProto .internal_static_google_cloud_functions_v1_HttpsTrigger_descriptor; @@ -397,7 +344,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(2, securityLevel_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -414,7 +361,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, securityLevel_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -432,7 +379,7 @@ public boolean equals(final java.lang.Object obj) { if (!getUrl().equals(other.getUrl())) return false; if (securityLevel_ != other.securityLevel_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -447,7 +394,7 @@ public int hashCode() { hash = (53 * hash) + getUrl().hashCode(); hash = (37 * hash) + SECURITY_LEVEL_FIELD_NUMBER; hash = (53 * hash) + securityLevel_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -576,17 +523,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v1.HttpsTrigger.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -681,7 +621,7 @@ public Builder mergeFrom(com.google.cloud.functions.v1.HttpsTrigger other) { if (other.securityLevel_ != 0) { setSecurityLevelValue(other.getSecurityLevelValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -696,17 +636,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v1.HttpsTrigger parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + url_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + securityLevel_ = input.readEnum(); + + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v1.HttpsTrigger) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -942,7 +908,18 @@ public HttpsTrigger parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new HttpsTrigger(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/ListFunctionsRequest.java b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/ListFunctionsRequest.java index 34ca7d208184..97d1f6d45f58 100644 --- a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/ListFunctionsRequest.java +++ b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/ListFunctionsRequest.java @@ -53,64 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListFunctionsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 16: - { - pageSize_ = input.readInt32(); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v1.FunctionsProto .internal_static_google_cloud_functions_v1_ListFunctionsRequest_descriptor; @@ -281,7 +223,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -299,7 +241,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -318,7 +260,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -335,7 +277,7 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -464,17 +406,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v1.ListFunctionsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -577,7 +512,7 @@ public Builder mergeFrom(com.google.cloud.functions.v1.ListFunctionsRequest othe pageToken_ = other.pageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -592,18 +527,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v1.ListFunctionsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v1.ListFunctionsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -943,7 +909,18 @@ public ListFunctionsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListFunctionsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/ListFunctionsResponse.java b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/ListFunctionsResponse.java index 47650bc00853..2a3529b0477c 100644 --- a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/ListFunctionsResponse.java +++ b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/ListFunctionsResponse.java @@ -54,80 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListFunctionsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - functions_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - functions_.add( - input.readMessage( - com.google.cloud.functions.v1.CloudFunction.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - unreachable_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - functions_ = java.util.Collections.unmodifiableList(functions_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v1.FunctionsProto .internal_static_google_cloud_functions_v1_ListFunctionsResponse_descriptor; @@ -355,7 +281,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < unreachable_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -378,7 +304,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getUnreachableList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -397,7 +323,7 @@ public boolean equals(final java.lang.Object obj) { if (!getFunctionsList().equals(other.getFunctionsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; if (!getUnreachableList().equals(other.getUnreachableList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -418,7 +344,7 @@ public int hashCode() { hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; hash = (53 * hash) + getUnreachableList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -547,19 +473,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v1.ListFunctionsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getFunctionsFieldBuilder(); - } } @java.lang.Override @@ -567,10 +484,11 @@ public Builder clear() { super.clear(); if (functionsBuilder_ == null) { functions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + functions_ = null; functionsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; @@ -709,7 +627,7 @@ public Builder mergeFrom(com.google.cloud.functions.v1.ListFunctionsResponse oth } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -724,18 +642,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v1.ListFunctionsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.functions.v1.CloudFunction m = + input.readMessage( + com.google.cloud.functions.v1.CloudFunction.parser(), extensionRegistry); + if (functionsBuilder_ == null) { + ensureFunctionsIsMutable(); + functions_.add(m); + } else { + functionsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v1.ListFunctionsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1422,7 +1379,18 @@ public ListFunctionsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListFunctionsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/OperationMetadataV1.java b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/OperationMetadataV1.java index 834c94736e13..08835bada591 100644 --- a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/OperationMetadataV1.java +++ b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/OperationMetadataV1.java @@ -56,114 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private OperationMetadataV1( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - target_ = s; - break; - } - case 16: - { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 26: - { - com.google.protobuf.Any.Builder subBuilder = null; - if (request_ != null) { - subBuilder = request_.toBuilder(); - } - request_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(request_); - request_ = subBuilder.buildPartial(); - } - - break; - } - case 32: - { - versionId_ = input.readInt64(); - break; - } - case 42: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - buildId_ = s; - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - sourceToken_ = s; - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - - buildName_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v1.FunctionsOperationsProto .internal_static_google_cloud_functions_v1_OperationMetadataV1_descriptor; @@ -570,7 +462,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, buildName_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -603,7 +495,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, buildName_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -633,7 +525,7 @@ public boolean equals(final java.lang.Object obj) { if (!getBuildId().equals(other.getBuildId())) return false; if (!getSourceToken().equals(other.getSourceToken())) return false; if (!getBuildName().equals(other.getBuildName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -664,7 +556,7 @@ public int hashCode() { hash = (53 * hash) + getSourceToken().hashCode(); hash = (37 * hash) + BUILD_NAME_FIELD_NUMBER; hash = (53 * hash) + getBuildName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -793,17 +685,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v1.OperationMetadataV1.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -954,7 +839,7 @@ public Builder mergeFrom(com.google.cloud.functions.v1.OperationMetadataV1 other buildName_ = other.buildName_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -969,18 +854,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v1.OperationMetadataV1 parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + target_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + type_ = input.readEnum(); + + break; + } // case 16 + case 26: + { + input.readMessage(getRequestFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 32: + { + versionId_ = input.readInt64(); + + break; + } // case 32 + case 42: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 50: + { + buildId_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 58: + { + sourceToken_ = input.readStringRequireUtf8(); + + break; + } // case 58 + case 66: + { + buildName_ = input.readStringRequireUtf8(); + + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v1.OperationMetadataV1) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1971,7 +1917,18 @@ public OperationMetadataV1 parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OperationMetadataV1(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/SecretEnvVar.java b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/SecretEnvVar.java index 2d15134ca65a..88eb192550f0 100644 --- a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/SecretEnvVar.java +++ b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/SecretEnvVar.java @@ -57,73 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecretEnvVar( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - key_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - projectId_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - secret_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - version_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v1.FunctionsProto .internal_static_google_cloud_functions_v1_SecretEnvVar_descriptor; @@ -371,7 +304,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, version_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -392,7 +325,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, version_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -412,7 +345,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProjectId().equals(other.getProjectId())) return false; if (!getSecret().equals(other.getSecret())) return false; if (!getVersion().equals(other.getVersion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -431,7 +364,7 @@ public int hashCode() { hash = (53 * hash) + getSecret().hashCode(); hash = (37 * hash) + VERSION_FIELD_NUMBER; hash = (53 * hash) + getVersion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -562,17 +495,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v1.SecretEnvVar.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -682,7 +608,7 @@ public Builder mergeFrom(com.google.cloud.functions.v1.SecretEnvVar other) { version_ = other.version_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -697,17 +623,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v1.SecretEnvVar parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + key_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + projectId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + secret_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + version_ = input.readStringRequireUtf8(); + + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v1.SecretEnvVar) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1192,7 +1156,18 @@ public SecretEnvVar parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecretEnvVar(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/SecretVolume.java b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/SecretVolume.java index ea376595aa97..db100f229343 100644 --- a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/SecretVolume.java +++ b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/SecretVolume.java @@ -59,84 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecretVolume( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - mountPath_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - projectId_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - secret_ = s; - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - versions_ = - new java.util.ArrayList< - com.google.cloud.functions.v1.SecretVolume.SecretVersion>(); - mutable_bitField0_ |= 0x00000001; - } - versions_.add( - input.readMessage( - com.google.cloud.functions.v1.SecretVolume.SecretVersion.parser(), - extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - versions_ = java.util.Collections.unmodifiableList(versions_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v1.FunctionsProto .internal_static_google_cloud_functions_v1_SecretVolume_descriptor; @@ -252,59 +174,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecretVersion( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - version_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - path_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v1.FunctionsProto .internal_static_google_cloud_functions_v1_SecretVolume_SecretVersion_descriptor; @@ -448,7 +317,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, path_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -463,7 +332,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, path_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -481,7 +350,7 @@ public boolean equals(final java.lang.Object obj) { if (!getVersion().equals(other.getVersion())) return false; if (!getPath().equals(other.getPath())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -496,7 +365,7 @@ public int hashCode() { hash = (53 * hash) + getVersion().hashCode(); hash = (37 * hash) + PATH_FIELD_NUMBER; hash = (53 * hash) + getPath().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -628,17 +497,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v1.SecretVolume.SecretVersion.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -737,7 +599,7 @@ public Builder mergeFrom(com.google.cloud.functions.v1.SecretVolume.SecretVersio path_ = other.path_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -752,18 +614,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v1.SecretVolume.SecretVersion parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + version_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + path_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v1.SecretVolume.SecretVersion) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1037,7 +924,19 @@ public SecretVersion parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecretVersion(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1326,7 +1225,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < versions_.size(); i++) { output.writeMessage(4, versions_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1347,7 +1246,7 @@ public int getSerializedSize() { for (int i = 0; i < versions_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, versions_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1367,7 +1266,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProjectId().equals(other.getProjectId())) return false; if (!getSecret().equals(other.getSecret())) return false; if (!getVersionsList().equals(other.getVersionsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1388,7 +1287,7 @@ public int hashCode() { hash = (37 * hash) + VERSIONS_FIELD_NUMBER; hash = (53 * hash) + getVersionsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1521,19 +1420,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v1.SecretVolume.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getVersionsFieldBuilder(); - } } @java.lang.Override @@ -1547,10 +1437,11 @@ public Builder clear() { if (versionsBuilder_ == null) { versions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + versions_ = null; versionsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -1679,7 +1570,7 @@ public Builder mergeFrom(com.google.cloud.functions.v1.SecretVolume other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1694,17 +1585,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v1.SecretVolume parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + mountPath_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + projectId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + secret_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + com.google.cloud.functions.v1.SecretVolume.SecretVersion m = + input.readMessage( + com.google.cloud.functions.v1.SecretVolume.SecretVersion.parser(), + extensionRegistry); + if (versionsBuilder_ == null) { + ensureVersionsIsMutable(); + versions_.add(m); + } else { + versionsBuilder_.addMessage(m); + } + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v1.SecretVolume) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2500,7 +2437,18 @@ public SecretVolume parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecretVolume(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/SourceRepository.java b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/SourceRepository.java index fb2f4c396784..4994f669e6cb 100644 --- a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/SourceRepository.java +++ b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/SourceRepository.java @@ -54,59 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SourceRepository( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - url_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - deployedUrl_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v1.FunctionsProto .internal_static_google_cloud_functions_v1_SourceRepository_descriptor; @@ -264,7 +211,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deployedUrl_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, deployedUrl_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -279,7 +226,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deployedUrl_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, deployedUrl_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -297,7 +244,7 @@ public boolean equals(final java.lang.Object obj) { if (!getUrl().equals(other.getUrl())) return false; if (!getDeployedUrl().equals(other.getDeployedUrl())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -312,7 +259,7 @@ public int hashCode() { hash = (53 * hash) + getUrl().hashCode(); hash = (37 * hash) + DEPLOYED_URL_FIELD_NUMBER; hash = (53 * hash) + getDeployedUrl().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -442,17 +389,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v1.SourceRepository.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -548,7 +488,7 @@ public Builder mergeFrom(com.google.cloud.functions.v1.SourceRepository other) { deployedUrl_ = other.deployedUrl_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -563,17 +503,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v1.SourceRepository parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + url_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + deployedUrl_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v1.SourceRepository) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -881,7 +847,18 @@ public SourceRepository parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SourceRepository(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/UpdateFunctionRequest.java b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/UpdateFunctionRequest.java index cf6a6c63f7df..95d5d2c7428a 100644 --- a/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/UpdateFunctionRequest.java +++ b/java-functions/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/UpdateFunctionRequest.java @@ -50,76 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateFunctionRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.functions.v1.CloudFunction.Builder subBuilder = null; - if (function_ != null) { - subBuilder = function_.toBuilder(); - } - function_ = - input.readMessage( - com.google.cloud.functions.v1.CloudFunction.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(function_); - function_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v1.FunctionsProto .internal_static_google_cloud_functions_v1_UpdateFunctionRequest_descriptor; @@ -255,7 +185,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateMask_ != null) { output.writeMessage(2, getUpdateMask()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -270,7 +200,7 @@ public int getSerializedSize() { if (updateMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -294,7 +224,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateMask()) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -313,7 +243,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; hash = (53 * hash) + getUpdateMask().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -442,17 +372,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v1.UpdateFunctionRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -563,7 +486,7 @@ public Builder mergeFrom(com.google.cloud.functions.v1.UpdateFunctionRequest oth if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -578,18 +501,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v1.UpdateFunctionRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getFunctionFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v1.UpdateFunctionRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1012,7 +960,18 @@ public UpdateFunctionRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateFunctionRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/BuildConfig.java b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/BuildConfig.java index 3aafdfe0bd84..03c55dc5fb5c 100644 --- a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/BuildConfig.java +++ b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/BuildConfig.java @@ -57,131 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BuildConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - build_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - runtime_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - entryPoint_ = s; - break; - } - case 34: - { - com.google.cloud.functions.v2.Source.Builder subBuilder = null; - if (source_ != null) { - subBuilder = source_.toBuilder(); - } - source_ = - input.readMessage( - com.google.cloud.functions.v2.Source.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(source_); - source_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - workerPool_ = s; - break; - } - case 50: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - environmentVariables_ = - com.google.protobuf.MapField.newMapField( - EnvironmentVariablesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - environmentVariables__ = - input.readMessage( - EnvironmentVariablesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - environmentVariables_ - .getMutableMap() - .put(environmentVariables__.getKey(), environmentVariables__.getValue()); - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - dockerRepository_ = s; - break; - } - case 66: - { - com.google.cloud.functions.v2.SourceProvenance.Builder subBuilder = null; - if (sourceProvenance_ != null) { - subBuilder = sourceProvenance_.toBuilder(); - } - sourceProvenance_ = - input.readMessage( - com.google.cloud.functions.v2.SourceProvenance.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sourceProvenance_); - sourceProvenance_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2.FunctionsProto .internal_static_google_cloud_functions_v2_BuildConfig_descriptor; @@ -762,7 +637,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (sourceProvenance_ != null) { output.writeMessage(8, getSourceProvenance()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -802,7 +677,7 @@ public int getSerializedSize() { if (sourceProvenance_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getSourceProvenance()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -833,7 +708,7 @@ public boolean equals(final java.lang.Object obj) { if (!internalGetEnvironmentVariables().equals(other.internalGetEnvironmentVariables())) return false; if (!getDockerRepository().equals(other.getDockerRepository())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -866,7 +741,7 @@ public int hashCode() { } hash = (37 * hash) + DOCKER_REPOSITORY_FIELD_NUMBER; hash = (53 * hash) + getDockerRepository().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1016,17 +891,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.functions.v2.BuildConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1176,7 +1044,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2.BuildConfig other) { dockerRepository_ = other.dockerRepository_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1191,17 +1059,86 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2.BuildConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + build_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + runtime_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + entryPoint_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + input.readMessage(getSourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 42: + { + workerPool_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: + { + com.google.protobuf.MapEntry + environmentVariables__ = + input.readMessage( + EnvironmentVariablesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableEnvironmentVariables() + .getMutableMap() + .put(environmentVariables__.getKey(), environmentVariables__.getValue()); + break; + } // case 50 + case 58: + { + dockerRepository_ = input.readStringRequireUtf8(); + + break; + } // case 58 + case 66: + { + input.readMessage( + getSourceProvenanceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2.BuildConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2488,7 +2425,18 @@ public BuildConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BuildConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/CreateFunctionRequest.java b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/CreateFunctionRequest.java index e294a6934aee..3337286d9576 100644 --- a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/CreateFunctionRequest.java +++ b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/CreateFunctionRequest.java @@ -53,75 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateFunctionRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: - { - com.google.cloud.functions.v2.Function.Builder subBuilder = null; - if (function_ != null) { - subBuilder = function_.toBuilder(); - } - function_ = - input.readMessage( - com.google.cloud.functions.v2.Function.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(function_); - function_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - functionId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2.FunctionsProto .internal_static_google_cloud_functions_v2_CreateFunctionRequest_descriptor; @@ -324,7 +255,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(functionId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, functionId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -342,7 +273,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(functionId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, functionId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -364,7 +295,7 @@ public boolean equals(final java.lang.Object obj) { if (!getFunction().equals(other.getFunction())) return false; } if (!getFunctionId().equals(other.getFunctionId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -383,7 +314,7 @@ public int hashCode() { } hash = (37 * hash) + FUNCTION_ID_FIELD_NUMBER; hash = (53 * hash) + getFunctionId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -512,17 +443,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2.CreateFunctionRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -633,7 +557,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2.CreateFunctionRequest oth functionId_ = other.functionId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -648,18 +572,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2.CreateFunctionRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getFunctionFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + functionId_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2.CreateFunctionRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1140,7 +1095,18 @@ public CreateFunctionRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateFunctionRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/DeleteFunctionRequest.java b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/DeleteFunctionRequest.java index f81ba5726c54..9cfc552c35cc 100644 --- a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/DeleteFunctionRequest.java +++ b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/DeleteFunctionRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteFunctionRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2.FunctionsProto .internal_static_google_cloud_functions_v2_DeleteFunctionRequest_descriptor; @@ -183,7 +137,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -195,7 +149,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -212,7 +166,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.functions.v2.DeleteFunctionRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -225,7 +179,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -354,17 +308,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2.DeleteFunctionRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -454,7 +401,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2.DeleteFunctionRequest oth name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -469,18 +416,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2.DeleteFunctionRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2.DeleteFunctionRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -632,7 +598,18 @@ public DeleteFunctionRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteFunctionRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/EventFilter.java b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/EventFilter.java index 0da961eff724..f4d8a960a794 100644 --- a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/EventFilter.java +++ b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/EventFilter.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private EventFilter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - attribute_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - value_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - operator_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2.FunctionsProto .internal_static_google_cloud_functions_v2_EventFilter_descriptor; @@ -305,7 +245,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operator_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, operator_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -323,7 +263,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operator_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, operator_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -342,7 +282,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAttribute().equals(other.getAttribute())) return false; if (!getValue().equals(other.getValue())) return false; if (!getOperator().equals(other.getOperator())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -359,7 +299,7 @@ public int hashCode() { hash = (53 * hash) + getValue().hashCode(); hash = (37 * hash) + OPERATOR_FIELD_NUMBER; hash = (53 * hash) + getOperator().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -488,17 +428,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2.EventFilter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -601,7 +534,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2.EventFilter other) { operator_ = other.operator_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -616,17 +549,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2.EventFilter parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + attribute_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + value_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + operator_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2.EventFilter) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -995,7 +960,18 @@ public EventFilter parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new EventFilter(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/EventTrigger.java b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/EventTrigger.java index 40613e1d0c20..392035f656f9 100644 --- a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/EventTrigger.java +++ b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/EventTrigger.java @@ -60,110 +60,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private EventTrigger( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - trigger_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - triggerRegion_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - eventType_ = s; - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - eventFilters_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - eventFilters_.add( - input.readMessage( - com.google.cloud.functions.v2.EventFilter.parser(), extensionRegistry)); - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - pubsubTopic_ = s; - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - serviceAccountEmail_ = s; - break; - } - case 56: - { - int rawValue = input.readEnum(); - - retryPolicy_ = rawValue; - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - - channel_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - eventFilters_ = java.util.Collections.unmodifiableList(eventFilters_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2.FunctionsProto .internal_static_google_cloud_functions_v2_EventTrigger_descriptor; @@ -830,7 +726,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channel_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, channel_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -865,7 +761,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channel_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, channel_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -889,7 +785,7 @@ public boolean equals(final java.lang.Object obj) { if (!getServiceAccountEmail().equals(other.getServiceAccountEmail())) return false; if (retryPolicy_ != other.retryPolicy_) return false; if (!getChannel().equals(other.getChannel())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -918,7 +814,7 @@ public int hashCode() { hash = (53 * hash) + retryPolicy_; hash = (37 * hash) + CHANNEL_FIELD_NUMBER; hash = (53 * hash) + getChannel().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1048,19 +944,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2.EventTrigger.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getEventFiltersFieldBuilder(); - } } @java.lang.Override @@ -1074,10 +961,11 @@ public Builder clear() { if (eventFiltersBuilder_ == null) { eventFilters_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + eventFilters_ = null; eventFiltersBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); pubsubTopic_ = ""; serviceAccountEmail_ = ""; @@ -1233,7 +1121,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2.EventTrigger other) { channel_ = other.channel_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1248,17 +1136,86 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2.EventTrigger parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + trigger_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + triggerRegion_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + eventType_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + com.google.cloud.functions.v2.EventFilter m = + input.readMessage( + com.google.cloud.functions.v2.EventFilter.parser(), extensionRegistry); + if (eventFiltersBuilder_ == null) { + ensureEventFiltersIsMutable(); + eventFilters_.add(m); + } else { + eventFiltersBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + pubsubTopic_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: + { + serviceAccountEmail_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 56: + { + retryPolicy_ = input.readEnum(); + + break; + } // case 56 + case 66: + { + channel_ = input.readStringRequireUtf8(); + + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2.EventTrigger) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2501,7 +2458,18 @@ public EventTrigger parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new EventTrigger(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/Function.java b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/Function.java index 8c0a8c92eab4..fc2a07ed812d 100644 --- a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/Function.java +++ b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/Function.java @@ -57,165 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Function( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 26: - { - com.google.cloud.functions.v2.BuildConfig.Builder subBuilder = null; - if (buildConfig_ != null) { - subBuilder = buildConfig_.toBuilder(); - } - buildConfig_ = - input.readMessage( - com.google.cloud.functions.v2.BuildConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(buildConfig_); - buildConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - com.google.cloud.functions.v2.ServiceConfig.Builder subBuilder = null; - if (serviceConfig_ != null) { - subBuilder = serviceConfig_.toBuilder(); - } - serviceConfig_ = - input.readMessage( - com.google.cloud.functions.v2.ServiceConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(serviceConfig_); - serviceConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - com.google.cloud.functions.v2.EventTrigger.Builder subBuilder = null; - if (eventTrigger_ != null) { - subBuilder = eventTrigger_.toBuilder(); - } - eventTrigger_ = - input.readMessage( - com.google.cloud.functions.v2.EventTrigger.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(eventTrigger_); - eventTrigger_ = subBuilder.buildPartial(); - } - - break; - } - case 48: - { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 58: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 66: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - break; - } - case 74: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - stateMessages_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - stateMessages_.add( - input.readMessage( - com.google.cloud.functions.v2.StateMessage.parser(), extensionRegistry)); - break; - } - case 80: - { - int rawValue = input.readEnum(); - - environment_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000002) != 0)) { - stateMessages_ = java.util.Collections.unmodifiableList(stateMessages_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2.FunctionsProto .internal_static_google_cloud_functions_v2_Function_descriptor; @@ -1066,7 +907,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io != com.google.cloud.functions.v2.Environment.ENVIRONMENT_UNSPECIFIED.getNumber()) { output.writeEnum(10, environment_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1113,7 +954,7 @@ public int getSerializedSize() { != com.google.cloud.functions.v2.Environment.ENVIRONMENT_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, environment_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1150,7 +991,7 @@ public boolean equals(final java.lang.Object obj) { } if (!internalGetLabels().equals(other.internalGetLabels())) return false; if (!getStateMessagesList().equals(other.getStateMessagesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1193,7 +1034,7 @@ public int hashCode() { hash = (37 * hash) + STATE_MESSAGES_FIELD_NUMBER; hash = (53 * hash) + getStateMessagesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1343,19 +1184,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.functions.v2.Function.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getStateMessagesFieldBuilder(); - } } @java.lang.Override @@ -1396,10 +1228,11 @@ public Builder clear() { internalGetMutableLabels().clear(); if (stateMessagesBuilder_ == null) { stateMessages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + stateMessages_ = null; stateMessagesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -1566,7 +1399,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2.Function other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1581,17 +1414,103 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2.Function parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getBuildConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + input.readMessage(getServiceConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 42: + { + input.readMessage(getEventTriggerFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 48: + { + state_ = input.readEnum(); + + break; + } // case 48 + case 58: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 58 + case 66: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 66 + case 74: + { + com.google.cloud.functions.v2.StateMessage m = + input.readMessage( + com.google.cloud.functions.v2.StateMessage.parser(), extensionRegistry); + if (stateMessagesBuilder_ == null) { + ensureStateMessagesIsMutable(); + stateMessages_.add(m); + } else { + stateMessagesBuilder_.addMessage(m); + } + break; + } // case 74 + case 80: + { + environment_ = input.readEnum(); + + break; + } // case 80 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2.Function) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3373,7 +3292,18 @@ public Function parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Function(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/GenerateDownloadUrlRequest.java b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/GenerateDownloadUrlRequest.java index 9dc614348a78..c11a3810bf40 100644 --- a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/GenerateDownloadUrlRequest.java +++ b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/GenerateDownloadUrlRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GenerateDownloadUrlRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2.FunctionsProto .internal_static_google_cloud_functions_v2_GenerateDownloadUrlRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.functions.v2.GenerateDownloadUrlRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -357,17 +311,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2.GenerateDownloadUrlRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -457,7 +404,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2.GenerateDownloadUrlReques name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -472,18 +419,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2.GenerateDownloadUrlRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2.GenerateDownloadUrlRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -640,7 +606,18 @@ public GenerateDownloadUrlRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GenerateDownloadUrlRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/GenerateDownloadUrlResponse.java b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/GenerateDownloadUrlResponse.java index a4602c534b22..651f1f82bdef 100644 --- a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/GenerateDownloadUrlResponse.java +++ b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/GenerateDownloadUrlResponse.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GenerateDownloadUrlResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - downloadUrl_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2.FunctionsProto .internal_static_google_cloud_functions_v2_GenerateDownloadUrlResponse_descriptor; @@ -181,7 +135,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(downloadUrl_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, downloadUrl_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -193,7 +147,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(downloadUrl_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, downloadUrl_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -210,7 +164,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.functions.v2.GenerateDownloadUrlResponse) obj; if (!getDownloadUrl().equals(other.getDownloadUrl())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -223,7 +177,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + DOWNLOAD_URL_FIELD_NUMBER; hash = (53 * hash) + getDownloadUrl().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -353,17 +307,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2.GenerateDownloadUrlResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -453,7 +400,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2.GenerateDownloadUrlRespon downloadUrl_ = other.downloadUrl_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -468,18 +415,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2.GenerateDownloadUrlResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + downloadUrl_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2.GenerateDownloadUrlResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -626,7 +592,18 @@ public GenerateDownloadUrlResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GenerateDownloadUrlResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/GenerateUploadUrlRequest.java b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/GenerateUploadUrlRequest.java index 02345a63be8c..efc2b657ff96 100644 --- a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/GenerateUploadUrlRequest.java +++ b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/GenerateUploadUrlRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GenerateUploadUrlRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2.FunctionsProto .internal_static_google_cloud_functions_v2_GenerateUploadUrlRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.functions.v2.GenerateUploadUrlRequest) obj; if (!getParent().equals(other.getParent())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PARENT_FIELD_NUMBER; hash = (53 * hash) + getParent().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -357,17 +311,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2.GenerateUploadUrlRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -457,7 +404,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2.GenerateUploadUrlRequest parent_ = other.parent_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -472,18 +419,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2.GenerateUploadUrlRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2.GenerateUploadUrlRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -640,7 +606,18 @@ public GenerateUploadUrlRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GenerateUploadUrlRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/GenerateUploadUrlResponse.java b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/GenerateUploadUrlResponse.java index f7431d3bd3b9..c64f977826b4 100644 --- a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/GenerateUploadUrlResponse.java +++ b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/GenerateUploadUrlResponse.java @@ -52,68 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GenerateUploadUrlResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - uploadUrl_ = s; - break; - } - case 18: - { - com.google.cloud.functions.v2.StorageSource.Builder subBuilder = null; - if (storageSource_ != null) { - subBuilder = storageSource_.toBuilder(); - } - storageSource_ = - input.readMessage( - com.google.cloud.functions.v2.StorageSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(storageSource_); - storageSource_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2.FunctionsProto .internal_static_google_cloud_functions_v2_GenerateUploadUrlResponse_descriptor; @@ -265,7 +203,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (storageSource_ != null) { output.writeMessage(2, getStorageSource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -280,7 +218,7 @@ public int getSerializedSize() { if (storageSource_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStorageSource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -301,7 +239,7 @@ public boolean equals(final java.lang.Object obj) { if (hasStorageSource()) { if (!getStorageSource().equals(other.getStorageSource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -318,7 +256,7 @@ public int hashCode() { hash = (37 * hash) + STORAGE_SOURCE_FIELD_NUMBER; hash = (53 * hash) + getStorageSource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -448,17 +386,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2.GenerateUploadUrlResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -562,7 +493,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2.GenerateUploadUrlResponse if (other.hasStorageSource()) { mergeStorageSource(other.getStorageSource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -577,18 +508,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2.GenerateUploadUrlResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + uploadUrl_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getStorageSourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2.GenerateUploadUrlResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -971,7 +927,18 @@ public GenerateUploadUrlResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GenerateUploadUrlResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/GetFunctionRequest.java b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/GetFunctionRequest.java index 20fd523c51b1..27f0728392bb 100644 --- a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/GetFunctionRequest.java +++ b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/GetFunctionRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetFunctionRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2.FunctionsProto .internal_static_google_cloud_functions_v2_GetFunctionRequest_descriptor; @@ -183,7 +137,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -195,7 +149,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -212,7 +166,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.functions.v2.GetFunctionRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -225,7 +179,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -354,17 +308,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2.GetFunctionRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -454,7 +401,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2.GetFunctionRequest other) name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -469,17 +416,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2.GetFunctionRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2.GetFunctionRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -631,7 +598,18 @@ public GetFunctionRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetFunctionRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/ListFunctionsRequest.java b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/ListFunctionsRequest.java index ce5a5edb45e6..d4f3a3d9aade 100644 --- a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/ListFunctionsRequest.java +++ b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/ListFunctionsRequest.java @@ -55,78 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListFunctionsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 16: - { - pageSize_ = input.readInt32(); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2.FunctionsProto .internal_static_google_cloud_functions_v2_ListFunctionsRequest_descriptor; @@ -411,7 +339,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -435,7 +363,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -456,7 +384,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPageToken().equals(other.getPageToken())) return false; if (!getFilter().equals(other.getFilter())) return false; if (!getOrderBy().equals(other.getOrderBy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -477,7 +405,7 @@ public int hashCode() { hash = (53 * hash) + getFilter().hashCode(); hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; hash = (53 * hash) + getOrderBy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -606,17 +534,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2.ListFunctionsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -733,7 +654,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2.ListFunctionsRequest othe orderBy_ = other.orderBy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -748,18 +669,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2.ListFunctionsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2.ListFunctionsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1336,7 +1300,18 @@ public ListFunctionsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListFunctionsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/ListFunctionsResponse.java b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/ListFunctionsResponse.java index 96ed9c913159..9e4aa582bb7e 100644 --- a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/ListFunctionsResponse.java +++ b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/ListFunctionsResponse.java @@ -54,80 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListFunctionsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - functions_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - functions_.add( - input.readMessage( - com.google.cloud.functions.v2.Function.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - unreachable_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - functions_ = java.util.Collections.unmodifiableList(functions_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2.FunctionsProto .internal_static_google_cloud_functions_v2_ListFunctionsResponse_descriptor; @@ -351,7 +277,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < unreachable_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -374,7 +300,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getUnreachableList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -393,7 +319,7 @@ public boolean equals(final java.lang.Object obj) { if (!getFunctionsList().equals(other.getFunctionsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; if (!getUnreachableList().equals(other.getUnreachableList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -414,7 +340,7 @@ public int hashCode() { hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; hash = (53 * hash) + getUnreachableList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -543,19 +469,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2.ListFunctionsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getFunctionsFieldBuilder(); - } } @java.lang.Override @@ -563,10 +480,11 @@ public Builder clear() { super.clear(); if (functionsBuilder_ == null) { functions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + functions_ = null; functionsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; @@ -705,7 +623,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2.ListFunctionsResponse oth } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -720,18 +638,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2.ListFunctionsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.functions.v2.Function m = + input.readMessage( + com.google.cloud.functions.v2.Function.parser(), extensionRegistry); + if (functionsBuilder_ == null) { + ensureFunctionsIsMutable(); + functions_.add(m); + } else { + functionsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2.ListFunctionsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1406,7 +1363,18 @@ public ListFunctionsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListFunctionsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/ListRuntimesRequest.java b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/ListRuntimesRequest.java index 4891d75b25a9..ec7afe53397e 100644 --- a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/ListRuntimesRequest.java +++ b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/ListRuntimesRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRuntimesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2.FunctionsProto .internal_static_google_cloud_functions_v2_ListRuntimesRequest_descriptor; @@ -247,7 +194,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -262,7 +209,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -280,7 +227,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (!getFilter().equals(other.getFilter())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -295,7 +242,7 @@ public int hashCode() { hash = (53 * hash) + getParent().hashCode(); hash = (37 * hash) + FILTER_FIELD_NUMBER; hash = (53 * hash) + getFilter().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -424,17 +371,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2.ListRuntimesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -531,7 +471,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2.ListRuntimesRequest other filter_ = other.filter_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -546,18 +486,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2.ListRuntimesRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2.ListRuntimesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -825,7 +790,18 @@ public ListRuntimesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRuntimesRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/ListRuntimesResponse.java b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/ListRuntimesResponse.java index 653df859f874..296962c8e915 100644 --- a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/ListRuntimesResponse.java +++ b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/ListRuntimesResponse.java @@ -52,63 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRuntimesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - runtimes_ = - new java.util.ArrayList< - com.google.cloud.functions.v2.ListRuntimesResponse.Runtime>(); - mutable_bitField0_ |= 0x00000001; - } - runtimes_.add( - input.readMessage( - com.google.cloud.functions.v2.ListRuntimesResponse.Runtime.parser(), - extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - runtimes_ = java.util.Collections.unmodifiableList(runtimes_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2.FunctionsProto .internal_static_google_cloud_functions_v2_ListRuntimesResponse_descriptor; @@ -566,87 +509,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Runtime( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 16: - { - int rawValue = input.readEnum(); - - stage_ = rawValue; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - warnings_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - warnings_.add(s); - break; - } - case 32: - { - int rawValue = input.readEnum(); - - environment_ = rawValue; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - warnings_ = warnings_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2.FunctionsProto .internal_static_google_cloud_functions_v2_ListRuntimesResponse_Runtime_descriptor; @@ -928,7 +790,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, displayName_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -961,7 +823,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, displayName_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -982,7 +844,7 @@ public boolean equals(final java.lang.Object obj) { if (stage_ != other.stage_) return false; if (!getWarningsList().equals(other.getWarningsList())) return false; if (environment_ != other.environment_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1005,7 +867,7 @@ public int hashCode() { } hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; hash = (53 * hash) + environment_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1138,17 +1000,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2.ListRuntimesResponse.Runtime.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1279,7 +1134,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2.ListRuntimesResponse.Runt if (other.environment_ != 0) { setEnvironmentValue(other.getEnvironmentValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1294,18 +1149,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2.ListRuntimesResponse.Runtime parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + stage_ = input.readEnum(); + + break; + } // case 16 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureWarningsIsMutable(); + warnings_.add(s); + break; + } // case 26 + case 32: + { + environment_ = input.readEnum(); + + break; + } // case 32 + case 42: + { + displayName_ = input.readStringRequireUtf8(); + + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2.ListRuntimesResponse.Runtime) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1910,7 +1809,19 @@ public Runtime parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Runtime(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2018,7 +1929,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < runtimes_.size(); i++) { output.writeMessage(1, runtimes_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2030,7 +1941,7 @@ public int getSerializedSize() { for (int i = 0; i < runtimes_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, runtimes_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2047,7 +1958,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.functions.v2.ListRuntimesResponse) obj; if (!getRuntimesList().equals(other.getRuntimesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2062,7 +1973,7 @@ public int hashCode() { hash = (37 * hash) + RUNTIMES_FIELD_NUMBER; hash = (53 * hash) + getRuntimesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2191,19 +2102,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2.ListRuntimesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getRuntimesFieldBuilder(); - } } @java.lang.Override @@ -2211,10 +2113,11 @@ public Builder clear() { super.clear(); if (runtimesBuilder_ == null) { runtimes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + runtimes_ = null; runtimesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -2329,7 +2232,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2.ListRuntimesResponse othe } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2344,18 +2247,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2.ListRuntimesResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.functions.v2.ListRuntimesResponse.Runtime m = + input.readMessage( + com.google.cloud.functions.v2.ListRuntimesResponse.Runtime.parser(), + extensionRegistry); + if (runtimesBuilder_ == null) { + ensureRuntimesIsMutable(); + runtimes_.add(m); + } else { + runtimesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2.ListRuntimesResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2758,7 +2688,18 @@ public ListRuntimesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRuntimesResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/OperationMetadata.java b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/OperationMetadata.java index 23355e2553c3..9e17cfcb8f02 100644 --- a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/OperationMetadata.java +++ b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/OperationMetadata.java @@ -56,138 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private OperationMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (endTime_ != null) { - subBuilder = endTime_.toBuilder(); - } - endTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTime_); - endTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - target_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - verb_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - statusDetail_ = s; - break; - } - case 48: - { - cancelRequested_ = input.readBool(); - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - apiVersion_ = s; - break; - } - case 66: - { - com.google.protobuf.Any.Builder subBuilder = null; - if (requestResource_ != null) { - subBuilder = requestResource_.toBuilder(); - } - requestResource_ = - input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(requestResource_); - requestResource_ = subBuilder.buildPartial(); - } - - break; - } - case 74: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - stages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - stages_.add( - input.readMessage( - com.google.cloud.functions.v2.Stage.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - stages_ = java.util.Collections.unmodifiableList(stages_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2.FunctionsProto .internal_static_google_cloud_functions_v2_OperationMetadata_descriptor; @@ -670,7 +538,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < stages_.size(); i++) { output.writeMessage(9, stages_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -706,7 +574,7 @@ public int getSerializedSize() { for (int i = 0; i < stages_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, stages_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -740,7 +608,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestResource().equals(other.getRequestResource())) return false; } if (!getStagesList().equals(other.getStagesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -777,7 +645,7 @@ public int hashCode() { hash = (37 * hash) + STAGES_FIELD_NUMBER; hash = (53 * hash) + getStagesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -906,19 +774,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2.OperationMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getStagesFieldBuilder(); - } } @java.lang.Override @@ -954,10 +813,11 @@ public Builder clear() { } if (stagesBuilder_ == null) { stages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + stages_ = null; stagesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -1120,7 +980,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2.OperationMetadata other) } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1135,17 +995,92 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2.OperationMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + target_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + verb_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + statusDetail_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 48: + { + cancelRequested_ = input.readBool(); + + break; + } // case 48 + case 58: + { + apiVersion_ = input.readStringRequireUtf8(); + + break; + } // case 58 + case 66: + { + input.readMessage(getRequestResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 66 + case 74: + { + com.google.cloud.functions.v2.Stage m = + input.readMessage( + com.google.cloud.functions.v2.Stage.parser(), extensionRegistry); + if (stagesBuilder_ == null) { + ensureStagesIsMutable(); + stages_.add(m); + } else { + stagesBuilder_.addMessage(m); + } + break; + } // case 74 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2.OperationMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2561,7 +2496,18 @@ public OperationMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OperationMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/RepoSource.java b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/RepoSource.java index 9990454ccc42..0608ddb3228f 100644 --- a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/RepoSource.java +++ b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/RepoSource.java @@ -54,92 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RepoSource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - projectId_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - repoName_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - revisionCase_ = 3; - revision_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - revisionCase_ = 4; - revision_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - revisionCase_ = 5; - revision_ = s; - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - dir_ = s; - break; - } - case 56: - { - invertRegex_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2.FunctionsProto .internal_static_google_cloud_functions_v2_RepoSource_descriptor; @@ -636,7 +550,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (invertRegex_ != false) { output.writeBool(7, invertRegex_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -666,7 +580,7 @@ public int getSerializedSize() { if (invertRegex_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, invertRegex_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -699,7 +613,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -734,7 +648,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -863,17 +777,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2.RepoSource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1021,7 +928,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2.RepoSource other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1036,17 +943,76 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2.RepoSource parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + projectId_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + repoName_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + revisionCase_ = 3; + revision_ = s; + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + revisionCase_ = 4; + revision_ = s; + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + revisionCase_ = 5; + revision_ = s; + break; + } // case 42 + case 50: + { + dir_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 56: + { + invertRegex_ = input.readBool(); + + break; + } // case 56 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2.RepoSource) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1915,7 +1881,18 @@ public RepoSource parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RepoSource(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/SecretEnvVar.java b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/SecretEnvVar.java index 1a2e2da6ea75..39d03585b207 100644 --- a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/SecretEnvVar.java +++ b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/SecretEnvVar.java @@ -57,73 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecretEnvVar( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - key_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - projectId_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - secret_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - version_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2.FunctionsProto .internal_static_google_cloud_functions_v2_SecretEnvVar_descriptor; @@ -371,7 +304,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, version_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -392,7 +325,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, version_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -412,7 +345,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProjectId().equals(other.getProjectId())) return false; if (!getSecret().equals(other.getSecret())) return false; if (!getVersion().equals(other.getVersion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -431,7 +364,7 @@ public int hashCode() { hash = (53 * hash) + getSecret().hashCode(); hash = (37 * hash) + VERSION_FIELD_NUMBER; hash = (53 * hash) + getVersion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -562,17 +495,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2.SecretEnvVar.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -682,7 +608,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2.SecretEnvVar other) { version_ = other.version_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -697,17 +623,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2.SecretEnvVar parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + key_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + projectId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + secret_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + version_ = input.readStringRequireUtf8(); + + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2.SecretEnvVar) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1192,7 +1156,18 @@ public SecretEnvVar parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecretEnvVar(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/SecretVolume.java b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/SecretVolume.java index fbb3dacf8273..e479366c3218 100644 --- a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/SecretVolume.java +++ b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/SecretVolume.java @@ -57,84 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecretVolume( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - mountPath_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - projectId_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - secret_ = s; - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - versions_ = - new java.util.ArrayList< - com.google.cloud.functions.v2.SecretVolume.SecretVersion>(); - mutable_bitField0_ |= 0x00000001; - } - versions_.add( - input.readMessage( - com.google.cloud.functions.v2.SecretVolume.SecretVersion.parser(), - extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - versions_ = java.util.Collections.unmodifiableList(versions_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2.FunctionsProto .internal_static_google_cloud_functions_v2_SecretVolume_descriptor; @@ -250,59 +172,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecretVersion( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - version_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - path_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2.FunctionsProto .internal_static_google_cloud_functions_v2_SecretVolume_SecretVersion_descriptor; @@ -446,7 +315,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, path_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -461,7 +330,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, path_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -479,7 +348,7 @@ public boolean equals(final java.lang.Object obj) { if (!getVersion().equals(other.getVersion())) return false; if (!getPath().equals(other.getPath())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -494,7 +363,7 @@ public int hashCode() { hash = (53 * hash) + getVersion().hashCode(); hash = (37 * hash) + PATH_FIELD_NUMBER; hash = (53 * hash) + getPath().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -626,17 +495,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2.SecretVolume.SecretVersion.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -735,7 +597,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2.SecretVolume.SecretVersio path_ = other.path_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -750,18 +612,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2.SecretVolume.SecretVersion parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + version_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + path_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2.SecretVolume.SecretVersion) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1035,7 +922,19 @@ public SecretVersion parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecretVersion(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1320,7 +1219,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < versions_.size(); i++) { output.writeMessage(4, versions_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1341,7 +1240,7 @@ public int getSerializedSize() { for (int i = 0; i < versions_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, versions_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1361,7 +1260,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProjectId().equals(other.getProjectId())) return false; if (!getSecret().equals(other.getSecret())) return false; if (!getVersionsList().equals(other.getVersionsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1382,7 +1281,7 @@ public int hashCode() { hash = (37 * hash) + VERSIONS_FIELD_NUMBER; hash = (53 * hash) + getVersionsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1513,19 +1412,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2.SecretVolume.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getVersionsFieldBuilder(); - } } @java.lang.Override @@ -1539,10 +1429,11 @@ public Builder clear() { if (versionsBuilder_ == null) { versions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + versions_ = null; versionsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -1671,7 +1562,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2.SecretVolume other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1686,17 +1577,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2.SecretVolume parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + mountPath_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + projectId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + secret_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + com.google.cloud.functions.v2.SecretVolume.SecretVersion m = + input.readMessage( + com.google.cloud.functions.v2.SecretVolume.SecretVersion.parser(), + extensionRegistry); + if (versionsBuilder_ == null) { + ensureVersionsIsMutable(); + versions_.add(m); + } else { + versionsBuilder_.addMessage(m); + } + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2.SecretVolume) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2482,7 +2419,18 @@ public SecretVolume parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecretVolume(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/ServiceConfig.java b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/ServiceConfig.java index 22553026bdd0..50034870c4a8 100644 --- a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/ServiceConfig.java +++ b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/ServiceConfig.java @@ -62,171 +62,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ServiceConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - service_ = s; - break; - } - case 16: - { - timeoutSeconds_ = input.readInt32(); - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - environmentVariables_ = - com.google.protobuf.MapField.newMapField( - EnvironmentVariablesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - environmentVariables__ = - input.readMessage( - EnvironmentVariablesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - environmentVariables_ - .getMutableMap() - .put(environmentVariables__.getKey(), environmentVariables__.getValue()); - break; - } - case 40: - { - maxInstanceCount_ = input.readInt32(); - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - vpcConnector_ = s; - break; - } - case 56: - { - int rawValue = input.readEnum(); - - vpcConnectorEgressSettings_ = rawValue; - break; - } - case 64: - { - int rawValue = input.readEnum(); - - ingressSettings_ = rawValue; - break; - } - case 74: - { - java.lang.String s = input.readStringRequireUtf8(); - - uri_ = s; - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - - serviceAccountEmail_ = s; - break; - } - case 96: - { - minInstanceCount_ = input.readInt32(); - break; - } - case 106: - { - java.lang.String s = input.readStringRequireUtf8(); - - availableMemory_ = s; - break; - } - case 128: - { - allTrafficOnLatestRevision_ = input.readBool(); - break; - } - case 138: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - secretEnvironmentVariables_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - secretEnvironmentVariables_.add( - input.readMessage( - com.google.cloud.functions.v2.SecretEnvVar.parser(), extensionRegistry)); - break; - } - case 146: - { - java.lang.String s = input.readStringRequireUtf8(); - - revision_ = s; - break; - } - case 154: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - secretVolumes_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - secretVolumes_.add( - input.readMessage( - com.google.cloud.functions.v2.SecretVolume.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000002) != 0)) { - secretEnvironmentVariables_ = - java.util.Collections.unmodifiableList(secretEnvironmentVariables_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - secretVolumes_ = java.util.Collections.unmodifiableList(secretVolumes_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2.FunctionsProto .internal_static_google_cloud_functions_v2_ServiceConfig_descriptor; @@ -1410,7 +1245,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < secretVolumes_.size(); i++) { output.writeMessage(19, secretVolumes_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1479,7 +1314,7 @@ public int getSerializedSize() { for (int i = 0; i < secretVolumes_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, secretVolumes_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1512,7 +1347,7 @@ public boolean equals(final java.lang.Object obj) { return false; if (!getSecretVolumesList().equals(other.getSecretVolumesList())) return false; if (!getRevision().equals(other.getRevision())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1559,7 +1394,7 @@ public int hashCode() { } hash = (37 * hash) + REVISION_FIELD_NUMBER; hash = (53 * hash) + getRevision().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1709,20 +1544,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.functions.v2.ServiceConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getSecretEnvironmentVariablesFieldBuilder(); - getSecretVolumesFieldBuilder(); - } } @java.lang.Override @@ -1753,16 +1578,18 @@ public Builder clear() { if (secretEnvironmentVariablesBuilder_ == null) { secretEnvironmentVariables_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + secretEnvironmentVariables_ = null; secretEnvironmentVariablesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); if (secretVolumesBuilder_ == null) { secretVolumes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + secretVolumes_ = null; secretVolumesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); revision_ = ""; return this; @@ -1972,7 +1799,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2.ServiceConfig other) { revision_ = other.revision_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1987,17 +1814,141 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2.ServiceConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + service_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + timeoutSeconds_ = input.readInt32(); + + break; + } // case 16 + case 34: + { + com.google.protobuf.MapEntry + environmentVariables__ = + input.readMessage( + EnvironmentVariablesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableEnvironmentVariables() + .getMutableMap() + .put(environmentVariables__.getKey(), environmentVariables__.getValue()); + break; + } // case 34 + case 40: + { + maxInstanceCount_ = input.readInt32(); + + break; + } // case 40 + case 50: + { + vpcConnector_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 56: + { + vpcConnectorEgressSettings_ = input.readEnum(); + + break; + } // case 56 + case 64: + { + ingressSettings_ = input.readEnum(); + + break; + } // case 64 + case 74: + { + uri_ = input.readStringRequireUtf8(); + + break; + } // case 74 + case 82: + { + serviceAccountEmail_ = input.readStringRequireUtf8(); + + break; + } // case 82 + case 96: + { + minInstanceCount_ = input.readInt32(); + + break; + } // case 96 + case 106: + { + availableMemory_ = input.readStringRequireUtf8(); + + break; + } // case 106 + case 128: + { + allTrafficOnLatestRevision_ = input.readBool(); + + break; + } // case 128 + case 138: + { + com.google.cloud.functions.v2.SecretEnvVar m = + input.readMessage( + com.google.cloud.functions.v2.SecretEnvVar.parser(), extensionRegistry); + if (secretEnvironmentVariablesBuilder_ == null) { + ensureSecretEnvironmentVariablesIsMutable(); + secretEnvironmentVariables_.add(m); + } else { + secretEnvironmentVariablesBuilder_.addMessage(m); + } + break; + } // case 138 + case 146: + { + revision_ = input.readStringRequireUtf8(); + + break; + } // case 146 + case 154: + { + com.google.cloud.functions.v2.SecretVolume m = + input.readMessage( + com.google.cloud.functions.v2.SecretVolume.parser(), extensionRegistry); + if (secretVolumesBuilder_ == null) { + ensureSecretVolumesIsMutable(); + secretVolumes_.add(m); + } else { + secretVolumesBuilder_.addMessage(m); + } + break; + } // case 154 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2.ServiceConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4110,7 +4061,18 @@ public ServiceConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ServiceConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/Source.java b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/Source.java index 02859b8c510d..de6596614a54 100644 --- a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/Source.java +++ b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/Source.java @@ -50,77 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Source( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.functions.v2.StorageSource.Builder subBuilder = null; - if (sourceCase_ == 1) { - subBuilder = ((com.google.cloud.functions.v2.StorageSource) source_).toBuilder(); - } - source_ = - input.readMessage( - com.google.cloud.functions.v2.StorageSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.functions.v2.StorageSource) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 1; - break; - } - case 18: - { - com.google.cloud.functions.v2.RepoSource.Builder subBuilder = null; - if (sourceCase_ == 2) { - subBuilder = ((com.google.cloud.functions.v2.RepoSource) source_).toBuilder(); - } - source_ = - input.readMessage( - com.google.cloud.functions.v2.RepoSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.functions.v2.RepoSource) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 2; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2.FunctionsProto .internal_static_google_cloud_functions_v2_Source_descriptor; @@ -308,7 +237,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (sourceCase_ == 2) { output.writeMessage(2, (com.google.cloud.functions.v2.RepoSource) source_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -327,7 +256,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 2, (com.google.cloud.functions.v2.RepoSource) source_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -353,7 +282,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -376,7 +305,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -504,22 +433,21 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2.Source.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); + if (storageSourceBuilder_ != null) { + storageSourceBuilder_.clear(); + } + if (repoSourceBuilder_ != null) { + repoSourceBuilder_.clear(); + } sourceCase_ = 0; source_ = null; return this; @@ -628,7 +556,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2.Source other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -643,17 +571,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2.Source parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getStorageSourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(getRepoSourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2.Source) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1131,7 +1085,18 @@ public Source parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Source(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/SourceProvenance.java b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/SourceProvenance.java index 594f2e8140a7..a5d5d44a45b9 100644 --- a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/SourceProvenance.java +++ b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/SourceProvenance.java @@ -51,77 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SourceProvenance( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.functions.v2.StorageSource.Builder subBuilder = null; - if (resolvedStorageSource_ != null) { - subBuilder = resolvedStorageSource_.toBuilder(); - } - resolvedStorageSource_ = - input.readMessage( - com.google.cloud.functions.v2.StorageSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(resolvedStorageSource_); - resolvedStorageSource_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.cloud.functions.v2.RepoSource.Builder subBuilder = null; - if (resolvedRepoSource_ != null) { - subBuilder = resolvedRepoSource_.toBuilder(); - } - resolvedRepoSource_ = - input.readMessage( - com.google.cloud.functions.v2.RepoSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(resolvedRepoSource_); - resolvedRepoSource_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2.FunctionsProto .internal_static_google_cloud_functions_v2_SourceProvenance_descriptor; @@ -259,7 +188,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (resolvedRepoSource_ != null) { output.writeMessage(2, getResolvedRepoSource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -275,7 +204,7 @@ public int getSerializedSize() { if (resolvedRepoSource_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getResolvedRepoSource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -299,7 +228,7 @@ public boolean equals(final java.lang.Object obj) { if (hasResolvedRepoSource()) { if (!getResolvedRepoSource().equals(other.getResolvedRepoSource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -318,7 +247,7 @@ public int hashCode() { hash = (37 * hash) + RESOLVED_REPO_SOURCE_FIELD_NUMBER; hash = (53 * hash) + getResolvedRepoSource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -448,17 +377,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2.SourceProvenance.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -568,7 +490,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2.SourceProvenance other) { if (other.hasResolvedRepoSource()) { mergeResolvedRepoSource(other.getResolvedRepoSource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -583,17 +505,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2.SourceProvenance parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getResolvedStorageSourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage( + getResolvedRepoSourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2.SourceProvenance) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1020,7 +970,18 @@ public SourceProvenance parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SourceProvenance(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/Stage.java b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/Stage.java index 3296dd6e00ea..ab5e3cf0c778 100644 --- a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/Stage.java +++ b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/Stage.java @@ -57,96 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Stage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - int rawValue = input.readEnum(); - - name_ = rawValue; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - message_ = s; - break; - } - case 24: - { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - resourceUri_ = s; - break; - } - case 50: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - stateMessages_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - stateMessages_.add( - input.readMessage( - com.google.cloud.functions.v2.StateMessage.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - stateMessages_ = java.util.Collections.unmodifiableList(stateMessages_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2.FunctionsProto .internal_static_google_cloud_functions_v2_Stage_descriptor; @@ -906,7 +816,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < stateMessages_.size(); i++) { output.writeMessage(6, stateMessages_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -933,7 +843,7 @@ public int getSerializedSize() { for (int i = 0; i < stateMessages_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, stateMessages_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -954,7 +864,7 @@ public boolean equals(final java.lang.Object obj) { if (!getResource().equals(other.getResource())) return false; if (!getResourceUri().equals(other.getResourceUri())) return false; if (!getStateMessagesList().equals(other.getStateMessagesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -979,7 +889,7 @@ public int hashCode() { hash = (37 * hash) + STATE_MESSAGES_FIELD_NUMBER; hash = (53 * hash) + getStateMessagesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1107,19 +1017,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2.Stage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getStateMessagesFieldBuilder(); - } } @java.lang.Override @@ -1137,10 +1038,11 @@ public Builder clear() { if (stateMessagesBuilder_ == null) { stateMessages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + stateMessages_ = null; stateMessagesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -1276,7 +1178,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2.Stage other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1291,17 +1193,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2.Stage parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + name_ = input.readEnum(); + + break; + } // case 8 + case 18: + { + message_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + state_ = input.readEnum(); + + break; + } // case 24 + case 34: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + resourceUri_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: + { + com.google.cloud.functions.v2.StateMessage m = + input.readMessage( + com.google.cloud.functions.v2.StateMessage.parser(), extensionRegistry); + if (stateMessagesBuilder_ == null) { + ensureStateMessagesIsMutable(); + stateMessages_.add(m); + } else { + stateMessagesBuilder_.addMessage(m); + } + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2.Stage) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2194,7 +2153,18 @@ public Stage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Stage(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/StateMessage.java b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/StateMessage.java index f7f6eaeb84ff..be97e87c8f06 100644 --- a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/StateMessage.java +++ b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/StateMessage.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private StateMessage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - int rawValue = input.readEnum(); - - severity_ = rawValue; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - type_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - message_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2.FunctionsProto .internal_static_google_cloud_functions_v2_StateMessage_descriptor; @@ -468,7 +408,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, message_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -487,7 +427,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, message_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -506,7 +446,7 @@ public boolean equals(final java.lang.Object obj) { if (severity_ != other.severity_) return false; if (!getType().equals(other.getType())) return false; if (!getMessage().equals(other.getMessage())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -523,7 +463,7 @@ public int hashCode() { hash = (53 * hash) + getType().hashCode(); hash = (37 * hash) + MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getMessage().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -652,17 +592,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2.StateMessage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -764,7 +697,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2.StateMessage other) { message_ = other.message_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -779,17 +712,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2.StateMessage parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + severity_ = input.readEnum(); + + break; + } // case 8 + case 18: + { + type_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + message_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2.StateMessage) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1130,7 +1095,18 @@ public StateMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new StateMessage(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/StorageSource.java b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/StorageSource.java index 27d3a96620c2..6a7b27be2d75 100644 --- a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/StorageSource.java +++ b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/StorageSource.java @@ -53,64 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private StorageSource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - bucket_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - object_ = s; - break; - } - case 24: - { - generation_ = input.readInt64(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2.FunctionsProto .internal_static_google_cloud_functions_v2_StorageSource_descriptor; @@ -274,7 +216,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (generation_ != 0L) { output.writeInt64(3, generation_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -292,7 +234,7 @@ public int getSerializedSize() { if (generation_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, generation_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -311,7 +253,7 @@ public boolean equals(final java.lang.Object obj) { if (!getBucket().equals(other.getBucket())) return false; if (!getObject().equals(other.getObject())) return false; if (getGeneration() != other.getGeneration()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -328,7 +270,7 @@ public int hashCode() { hash = (53 * hash) + getObject().hashCode(); hash = (37 * hash) + GENERATION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getGeneration()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -457,17 +399,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2.StorageSource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -569,7 +504,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2.StorageSource other) { if (other.getGeneration() != 0L) { setGeneration(other.getGeneration()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -584,17 +519,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2.StorageSource parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + bucket_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + object_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + generation_ = input.readInt64(); + + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2.StorageSource) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -917,7 +884,18 @@ public StorageSource parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new StorageSource(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/UpdateFunctionRequest.java b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/UpdateFunctionRequest.java index 1076c76dda2f..8ce3d46dba8c 100644 --- a/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/UpdateFunctionRequest.java +++ b/java-functions/proto-google-cloud-functions-v2/src/main/java/com/google/cloud/functions/v2/UpdateFunctionRequest.java @@ -50,76 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateFunctionRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.functions.v2.Function.Builder subBuilder = null; - if (function_ != null) { - subBuilder = function_.toBuilder(); - } - function_ = - input.readMessage( - com.google.cloud.functions.v2.Function.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(function_); - function_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2.FunctionsProto .internal_static_google_cloud_functions_v2_UpdateFunctionRequest_descriptor; @@ -261,7 +191,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateMask_ != null) { output.writeMessage(2, getUpdateMask()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -276,7 +206,7 @@ public int getSerializedSize() { if (updateMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -300,7 +230,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateMask()) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -319,7 +249,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; hash = (53 * hash) + getUpdateMask().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -448,17 +378,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2.UpdateFunctionRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -569,7 +492,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2.UpdateFunctionRequest oth if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -584,18 +507,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2.UpdateFunctionRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getFunctionFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2.UpdateFunctionRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1035,7 +983,18 @@ public UpdateFunctionRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateFunctionRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/BuildConfig.java b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/BuildConfig.java index cc229f07f690..150a22e6d1c6 100644 --- a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/BuildConfig.java +++ b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/BuildConfig.java @@ -57,132 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BuildConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - build_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - runtime_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - entryPoint_ = s; - break; - } - case 34: - { - com.google.cloud.functions.v2alpha.Source.Builder subBuilder = null; - if (source_ != null) { - subBuilder = source_.toBuilder(); - } - source_ = - input.readMessage( - com.google.cloud.functions.v2alpha.Source.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(source_); - source_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - workerPool_ = s; - break; - } - case 50: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - environmentVariables_ = - com.google.protobuf.MapField.newMapField( - EnvironmentVariablesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - environmentVariables__ = - input.readMessage( - EnvironmentVariablesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - environmentVariables_ - .getMutableMap() - .put(environmentVariables__.getKey(), environmentVariables__.getValue()); - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - dockerRepository_ = s; - break; - } - case 66: - { - com.google.cloud.functions.v2alpha.SourceProvenance.Builder subBuilder = null; - if (sourceProvenance_ != null) { - subBuilder = sourceProvenance_.toBuilder(); - } - sourceProvenance_ = - input.readMessage( - com.google.cloud.functions.v2alpha.SourceProvenance.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sourceProvenance_); - sourceProvenance_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2alpha.FunctionsProto .internal_static_google_cloud_functions_v2alpha_BuildConfig_descriptor; @@ -766,7 +640,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (sourceProvenance_ != null) { output.writeMessage(8, getSourceProvenance()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -806,7 +680,7 @@ public int getSerializedSize() { if (sourceProvenance_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getSourceProvenance()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -837,7 +711,7 @@ public boolean equals(final java.lang.Object obj) { if (!internalGetEnvironmentVariables().equals(other.internalGetEnvironmentVariables())) return false; if (!getDockerRepository().equals(other.getDockerRepository())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -870,7 +744,7 @@ public int hashCode() { } hash = (37 * hash) + DOCKER_REPOSITORY_FIELD_NUMBER; hash = (53 * hash) + getDockerRepository().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1020,17 +894,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.functions.v2alpha.BuildConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1180,7 +1047,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2alpha.BuildConfig other) { dockerRepository_ = other.dockerRepository_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1195,17 +1062,86 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2alpha.BuildConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + build_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + runtime_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + entryPoint_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + input.readMessage(getSourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 42: + { + workerPool_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: + { + com.google.protobuf.MapEntry + environmentVariables__ = + input.readMessage( + EnvironmentVariablesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableEnvironmentVariables() + .getMutableMap() + .put(environmentVariables__.getKey(), environmentVariables__.getValue()); + break; + } // case 50 + case 58: + { + dockerRepository_ = input.readStringRequireUtf8(); + + break; + } // case 58 + case 66: + { + input.readMessage( + getSourceProvenanceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2alpha.BuildConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2495,7 +2431,18 @@ public BuildConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BuildConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/CreateFunctionRequest.java b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/CreateFunctionRequest.java index 7865a8a73384..d5ab89aa5582 100644 --- a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/CreateFunctionRequest.java +++ b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/CreateFunctionRequest.java @@ -53,75 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateFunctionRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: - { - com.google.cloud.functions.v2alpha.Function.Builder subBuilder = null; - if (function_ != null) { - subBuilder = function_.toBuilder(); - } - function_ = - input.readMessage( - com.google.cloud.functions.v2alpha.Function.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(function_); - function_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - functionId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2alpha.FunctionsProto .internal_static_google_cloud_functions_v2alpha_CreateFunctionRequest_descriptor; @@ -324,7 +255,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(functionId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, functionId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -342,7 +273,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(functionId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, functionId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -364,7 +295,7 @@ public boolean equals(final java.lang.Object obj) { if (!getFunction().equals(other.getFunction())) return false; } if (!getFunctionId().equals(other.getFunctionId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -383,7 +314,7 @@ public int hashCode() { } hash = (37 * hash) + FUNCTION_ID_FIELD_NUMBER; hash = (53 * hash) + getFunctionId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -513,17 +444,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2alpha.CreateFunctionRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -634,7 +558,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2alpha.CreateFunctionReques functionId_ = other.functionId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -649,18 +573,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2alpha.CreateFunctionRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getFunctionFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + functionId_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2alpha.CreateFunctionRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1142,7 +1097,18 @@ public CreateFunctionRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateFunctionRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/DeleteFunctionRequest.java b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/DeleteFunctionRequest.java index 4bd8cd10960d..bd6cceba40c2 100644 --- a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/DeleteFunctionRequest.java +++ b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/DeleteFunctionRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteFunctionRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2alpha.FunctionsProto .internal_static_google_cloud_functions_v2alpha_DeleteFunctionRequest_descriptor; @@ -183,7 +137,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -195,7 +149,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -212,7 +166,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.functions.v2alpha.DeleteFunctionRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -225,7 +179,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -355,17 +309,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2alpha.DeleteFunctionRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -455,7 +402,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2alpha.DeleteFunctionReques name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -470,18 +417,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2alpha.DeleteFunctionRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2alpha.DeleteFunctionRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -633,7 +599,18 @@ public DeleteFunctionRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteFunctionRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/EventFilter.java b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/EventFilter.java index d148dbc71e99..dfae70464eff 100644 --- a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/EventFilter.java +++ b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/EventFilter.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private EventFilter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - attribute_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - value_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - operator_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2alpha.FunctionsProto .internal_static_google_cloud_functions_v2alpha_EventFilter_descriptor; @@ -305,7 +245,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operator_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, operator_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -323,7 +263,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operator_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, operator_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -342,7 +282,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAttribute().equals(other.getAttribute())) return false; if (!getValue().equals(other.getValue())) return false; if (!getOperator().equals(other.getOperator())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -359,7 +299,7 @@ public int hashCode() { hash = (53 * hash) + getValue().hashCode(); hash = (37 * hash) + OPERATOR_FIELD_NUMBER; hash = (53 * hash) + getOperator().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -488,17 +428,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2alpha.EventFilter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -601,7 +534,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2alpha.EventFilter other) { operator_ = other.operator_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -616,17 +549,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2alpha.EventFilter parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + attribute_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + value_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + operator_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2alpha.EventFilter) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -995,7 +960,18 @@ public EventFilter parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new EventFilter(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/EventTrigger.java b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/EventTrigger.java index 95129990e6aa..69d4c535f8f6 100644 --- a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/EventTrigger.java +++ b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/EventTrigger.java @@ -60,110 +60,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private EventTrigger( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - trigger_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - triggerRegion_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - eventType_ = s; - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - eventFilters_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - eventFilters_.add( - input.readMessage( - com.google.cloud.functions.v2alpha.EventFilter.parser(), extensionRegistry)); - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - pubsubTopic_ = s; - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - serviceAccountEmail_ = s; - break; - } - case 56: - { - int rawValue = input.readEnum(); - - retryPolicy_ = rawValue; - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - - channel_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - eventFilters_ = java.util.Collections.unmodifiableList(eventFilters_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2alpha.FunctionsProto .internal_static_google_cloud_functions_v2alpha_EventTrigger_descriptor; @@ -831,7 +727,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channel_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, channel_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -866,7 +762,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channel_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, channel_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -890,7 +786,7 @@ public boolean equals(final java.lang.Object obj) { if (!getServiceAccountEmail().equals(other.getServiceAccountEmail())) return false; if (retryPolicy_ != other.retryPolicy_) return false; if (!getChannel().equals(other.getChannel())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -919,7 +815,7 @@ public int hashCode() { hash = (53 * hash) + retryPolicy_; hash = (37 * hash) + CHANNEL_FIELD_NUMBER; hash = (53 * hash) + getChannel().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1049,19 +945,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2alpha.EventTrigger.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getEventFiltersFieldBuilder(); - } } @java.lang.Override @@ -1075,10 +962,11 @@ public Builder clear() { if (eventFiltersBuilder_ == null) { eventFilters_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + eventFilters_ = null; eventFiltersBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); pubsubTopic_ = ""; serviceAccountEmail_ = ""; @@ -1235,7 +1123,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2alpha.EventTrigger other) channel_ = other.channel_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1250,17 +1138,86 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2alpha.EventTrigger parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + trigger_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + triggerRegion_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + eventType_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + com.google.cloud.functions.v2alpha.EventFilter m = + input.readMessage( + com.google.cloud.functions.v2alpha.EventFilter.parser(), extensionRegistry); + if (eventFiltersBuilder_ == null) { + ensureEventFiltersIsMutable(); + eventFilters_.add(m); + } else { + eventFiltersBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + pubsubTopic_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: + { + serviceAccountEmail_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 56: + { + retryPolicy_ = input.readEnum(); + + break; + } // case 56 + case 66: + { + channel_ = input.readStringRequireUtf8(); + + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2alpha.EventTrigger) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2509,7 +2466,18 @@ public EventTrigger parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new EventTrigger(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/Function.java b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/Function.java index 269eb5a64db6..68f33f624d8f 100644 --- a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/Function.java +++ b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/Function.java @@ -57,165 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Function( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 26: - { - com.google.cloud.functions.v2alpha.BuildConfig.Builder subBuilder = null; - if (buildConfig_ != null) { - subBuilder = buildConfig_.toBuilder(); - } - buildConfig_ = - input.readMessage( - com.google.cloud.functions.v2alpha.BuildConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(buildConfig_); - buildConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - com.google.cloud.functions.v2alpha.ServiceConfig.Builder subBuilder = null; - if (serviceConfig_ != null) { - subBuilder = serviceConfig_.toBuilder(); - } - serviceConfig_ = - input.readMessage( - com.google.cloud.functions.v2alpha.ServiceConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(serviceConfig_); - serviceConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - com.google.cloud.functions.v2alpha.EventTrigger.Builder subBuilder = null; - if (eventTrigger_ != null) { - subBuilder = eventTrigger_.toBuilder(); - } - eventTrigger_ = - input.readMessage( - com.google.cloud.functions.v2alpha.EventTrigger.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(eventTrigger_); - eventTrigger_ = subBuilder.buildPartial(); - } - - break; - } - case 48: - { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 58: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 66: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - break; - } - case 74: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - stateMessages_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - stateMessages_.add( - input.readMessage( - com.google.cloud.functions.v2alpha.StateMessage.parser(), extensionRegistry)); - break; - } - case 80: - { - int rawValue = input.readEnum(); - - environment_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000002) != 0)) { - stateMessages_ = java.util.Collections.unmodifiableList(stateMessages_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2alpha.FunctionsProto .internal_static_google_cloud_functions_v2alpha_Function_descriptor; @@ -1067,7 +908,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io != com.google.cloud.functions.v2alpha.Environment.ENVIRONMENT_UNSPECIFIED.getNumber()) { output.writeEnum(10, environment_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1114,7 +955,7 @@ public int getSerializedSize() { != com.google.cloud.functions.v2alpha.Environment.ENVIRONMENT_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, environment_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1152,7 +993,7 @@ public boolean equals(final java.lang.Object obj) { } if (!internalGetLabels().equals(other.internalGetLabels())) return false; if (!getStateMessagesList().equals(other.getStateMessagesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1195,7 +1036,7 @@ public int hashCode() { hash = (37 * hash) + STATE_MESSAGES_FIELD_NUMBER; hash = (53 * hash) + getStateMessagesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1345,19 +1186,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.functions.v2alpha.Function.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getStateMessagesFieldBuilder(); - } } @java.lang.Override @@ -1398,10 +1230,11 @@ public Builder clear() { internalGetMutableLabels().clear(); if (stateMessagesBuilder_ == null) { stateMessages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + stateMessages_ = null; stateMessagesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -1568,7 +1401,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2alpha.Function other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1583,17 +1416,104 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2alpha.Function parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getBuildConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + input.readMessage(getServiceConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 42: + { + input.readMessage(getEventTriggerFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 48: + { + state_ = input.readEnum(); + + break; + } // case 48 + case 58: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 58 + case 66: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 66 + case 74: + { + com.google.cloud.functions.v2alpha.StateMessage m = + input.readMessage( + com.google.cloud.functions.v2alpha.StateMessage.parser(), + extensionRegistry); + if (stateMessagesBuilder_ == null) { + ensureStateMessagesIsMutable(); + stateMessages_.add(m); + } else { + stateMessagesBuilder_.addMessage(m); + } + break; + } // case 74 + case 80: + { + environment_ = input.readEnum(); + + break; + } // case 80 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2alpha.Function) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3382,7 +3302,18 @@ public Function parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Function(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/GenerateDownloadUrlRequest.java b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/GenerateDownloadUrlRequest.java index fc13cd9c5ec0..ea60b090171a 100644 --- a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/GenerateDownloadUrlRequest.java +++ b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/GenerateDownloadUrlRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GenerateDownloadUrlRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2alpha.FunctionsProto .internal_static_google_cloud_functions_v2alpha_GenerateDownloadUrlRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.functions.v2alpha.GenerateDownloadUrlRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -357,17 +311,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2alpha.GenerateDownloadUrlRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -459,7 +406,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2alpha.GenerateDownloadUrlR name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -474,19 +421,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2alpha.GenerateDownloadUrlRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2alpha.GenerateDownloadUrlRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -644,7 +609,18 @@ public GenerateDownloadUrlRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GenerateDownloadUrlRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/GenerateDownloadUrlResponse.java b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/GenerateDownloadUrlResponse.java index c10d78f2d615..ab02b352a98b 100644 --- a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/GenerateDownloadUrlResponse.java +++ b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/GenerateDownloadUrlResponse.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GenerateDownloadUrlResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - downloadUrl_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2alpha.FunctionsProto .internal_static_google_cloud_functions_v2alpha_GenerateDownloadUrlResponse_descriptor; @@ -181,7 +135,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(downloadUrl_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, downloadUrl_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -193,7 +147,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(downloadUrl_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, downloadUrl_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -210,7 +164,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.functions.v2alpha.GenerateDownloadUrlResponse) obj; if (!getDownloadUrl().equals(other.getDownloadUrl())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -223,7 +177,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + DOWNLOAD_URL_FIELD_NUMBER; hash = (53 * hash) + getDownloadUrl().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -353,17 +307,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2alpha.GenerateDownloadUrlResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -455,7 +402,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2alpha.GenerateDownloadUrlR downloadUrl_ = other.downloadUrl_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -470,19 +417,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2alpha.GenerateDownloadUrlResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + downloadUrl_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2alpha.GenerateDownloadUrlResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -631,7 +596,18 @@ public GenerateDownloadUrlResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GenerateDownloadUrlResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/GenerateUploadUrlRequest.java b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/GenerateUploadUrlRequest.java index b37f9efe34e2..d1d76dbe7d21 100644 --- a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/GenerateUploadUrlRequest.java +++ b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/GenerateUploadUrlRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GenerateUploadUrlRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2alpha.FunctionsProto .internal_static_google_cloud_functions_v2alpha_GenerateUploadUrlRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.functions.v2alpha.GenerateUploadUrlRequest) obj; if (!getParent().equals(other.getParent())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PARENT_FIELD_NUMBER; hash = (53 * hash) + getParent().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -357,17 +311,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2alpha.GenerateUploadUrlRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -457,7 +404,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2alpha.GenerateUploadUrlReq parent_ = other.parent_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -472,18 +419,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2alpha.GenerateUploadUrlRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2alpha.GenerateUploadUrlRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -640,7 +606,18 @@ public GenerateUploadUrlRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GenerateUploadUrlRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/GenerateUploadUrlResponse.java b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/GenerateUploadUrlResponse.java index 0f0a5f0aa8f8..9481b4451407 100644 --- a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/GenerateUploadUrlResponse.java +++ b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/GenerateUploadUrlResponse.java @@ -52,68 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GenerateUploadUrlResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - uploadUrl_ = s; - break; - } - case 18: - { - com.google.cloud.functions.v2alpha.StorageSource.Builder subBuilder = null; - if (storageSource_ != null) { - subBuilder = storageSource_.toBuilder(); - } - storageSource_ = - input.readMessage( - com.google.cloud.functions.v2alpha.StorageSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(storageSource_); - storageSource_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2alpha.FunctionsProto .internal_static_google_cloud_functions_v2alpha_GenerateUploadUrlResponse_descriptor; @@ -265,7 +203,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (storageSource_ != null) { output.writeMessage(2, getStorageSource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -280,7 +218,7 @@ public int getSerializedSize() { if (storageSource_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStorageSource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -301,7 +239,7 @@ public boolean equals(final java.lang.Object obj) { if (hasStorageSource()) { if (!getStorageSource().equals(other.getStorageSource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -318,7 +256,7 @@ public int hashCode() { hash = (37 * hash) + STORAGE_SOURCE_FIELD_NUMBER; hash = (53 * hash) + getStorageSource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -448,17 +386,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2alpha.GenerateUploadUrlResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -564,7 +495,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2alpha.GenerateUploadUrlRes if (other.hasStorageSource()) { mergeStorageSource(other.getStorageSource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -579,18 +510,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2alpha.GenerateUploadUrlResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + uploadUrl_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getStorageSourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2alpha.GenerateUploadUrlResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -974,7 +930,18 @@ public GenerateUploadUrlResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GenerateUploadUrlResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/GetFunctionRequest.java b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/GetFunctionRequest.java index 8af4a3e7cb2f..887e15bcf6a1 100644 --- a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/GetFunctionRequest.java +++ b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/GetFunctionRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetFunctionRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2alpha.FunctionsProto .internal_static_google_cloud_functions_v2alpha_GetFunctionRequest_descriptor; @@ -183,7 +137,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -195,7 +149,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -212,7 +166,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.functions.v2alpha.GetFunctionRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -225,7 +179,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -355,17 +309,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2alpha.GetFunctionRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -455,7 +402,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2alpha.GetFunctionRequest o name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -470,18 +417,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2alpha.GetFunctionRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2alpha.GetFunctionRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -633,7 +599,18 @@ public GetFunctionRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetFunctionRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/ListFunctionsRequest.java b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/ListFunctionsRequest.java index 2bb71b1c2baf..d220d1ef7042 100644 --- a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/ListFunctionsRequest.java +++ b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/ListFunctionsRequest.java @@ -55,78 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListFunctionsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 16: - { - pageSize_ = input.readInt32(); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2alpha.FunctionsProto .internal_static_google_cloud_functions_v2alpha_ListFunctionsRequest_descriptor; @@ -411,7 +339,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -435,7 +363,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -456,7 +384,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPageToken().equals(other.getPageToken())) return false; if (!getFilter().equals(other.getFilter())) return false; if (!getOrderBy().equals(other.getOrderBy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -477,7 +405,7 @@ public int hashCode() { hash = (53 * hash) + getFilter().hashCode(); hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; hash = (53 * hash) + getOrderBy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -607,17 +535,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2alpha.ListFunctionsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -734,7 +655,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2alpha.ListFunctionsRequest orderBy_ = other.orderBy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -749,18 +670,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2alpha.ListFunctionsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2alpha.ListFunctionsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1337,7 +1301,18 @@ public ListFunctionsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListFunctionsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/ListFunctionsResponse.java b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/ListFunctionsResponse.java index a7088f2d79cd..fb53d77de099 100644 --- a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/ListFunctionsResponse.java +++ b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/ListFunctionsResponse.java @@ -54,80 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListFunctionsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - functions_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - functions_.add( - input.readMessage( - com.google.cloud.functions.v2alpha.Function.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - unreachable_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - functions_ = java.util.Collections.unmodifiableList(functions_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2alpha.FunctionsProto .internal_static_google_cloud_functions_v2alpha_ListFunctionsResponse_descriptor; @@ -351,7 +277,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < unreachable_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -374,7 +300,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getUnreachableList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -393,7 +319,7 @@ public boolean equals(final java.lang.Object obj) { if (!getFunctionsList().equals(other.getFunctionsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; if (!getUnreachableList().equals(other.getUnreachableList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -414,7 +340,7 @@ public int hashCode() { hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; hash = (53 * hash) + getUnreachableList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -544,19 +470,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2alpha.ListFunctionsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getFunctionsFieldBuilder(); - } } @java.lang.Override @@ -564,10 +481,11 @@ public Builder clear() { super.clear(); if (functionsBuilder_ == null) { functions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + functions_ = null; functionsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; @@ -706,7 +624,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2alpha.ListFunctionsRespons } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -721,18 +639,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2alpha.ListFunctionsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.functions.v2alpha.Function m = + input.readMessage( + com.google.cloud.functions.v2alpha.Function.parser(), extensionRegistry); + if (functionsBuilder_ == null) { + ensureFunctionsIsMutable(); + functions_.add(m); + } else { + functionsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2alpha.ListFunctionsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1409,7 +1366,18 @@ public ListFunctionsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListFunctionsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/ListRuntimesRequest.java b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/ListRuntimesRequest.java index 1af94918f3ed..0ae6e269fe21 100644 --- a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/ListRuntimesRequest.java +++ b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/ListRuntimesRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRuntimesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2alpha.FunctionsProto .internal_static_google_cloud_functions_v2alpha_ListRuntimesRequest_descriptor; @@ -247,7 +194,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -262,7 +209,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -280,7 +227,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (!getFilter().equals(other.getFilter())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -295,7 +242,7 @@ public int hashCode() { hash = (53 * hash) + getParent().hashCode(); hash = (37 * hash) + FILTER_FIELD_NUMBER; hash = (53 * hash) + getFilter().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -425,17 +372,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2alpha.ListRuntimesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -532,7 +472,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2alpha.ListRuntimesRequest filter_ = other.filter_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -547,18 +487,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2alpha.ListRuntimesRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2alpha.ListRuntimesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -826,7 +791,18 @@ public ListRuntimesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRuntimesRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/ListRuntimesResponse.java b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/ListRuntimesResponse.java index da1813d56dc7..4d3b74360c08 100644 --- a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/ListRuntimesResponse.java +++ b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/ListRuntimesResponse.java @@ -52,63 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRuntimesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - runtimes_ = - new java.util.ArrayList< - com.google.cloud.functions.v2alpha.ListRuntimesResponse.Runtime>(); - mutable_bitField0_ |= 0x00000001; - } - runtimes_.add( - input.readMessage( - com.google.cloud.functions.v2alpha.ListRuntimesResponse.Runtime.parser(), - extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - runtimes_ = java.util.Collections.unmodifiableList(runtimes_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2alpha.FunctionsProto .internal_static_google_cloud_functions_v2alpha_ListRuntimesResponse_descriptor; @@ -566,87 +509,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Runtime( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 16: - { - int rawValue = input.readEnum(); - - stage_ = rawValue; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - warnings_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - warnings_.add(s); - break; - } - case 32: - { - int rawValue = input.readEnum(); - - environment_ = rawValue; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - warnings_ = warnings_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2alpha.FunctionsProto .internal_static_google_cloud_functions_v2alpha_ListRuntimesResponse_Runtime_descriptor; @@ -928,7 +790,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, displayName_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -961,7 +823,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, displayName_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -982,7 +844,7 @@ public boolean equals(final java.lang.Object obj) { if (stage_ != other.stage_) return false; if (!getWarningsList().equals(other.getWarningsList())) return false; if (environment_ != other.environment_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1005,7 +867,7 @@ public int hashCode() { } hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; hash = (53 * hash) + environment_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1140,17 +1002,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.functions.v2alpha.ListRuntimesResponse.Runtime.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1282,7 +1137,7 @@ public Builder mergeFrom( if (other.environment_ != 0) { setEnvironmentValue(other.getEnvironmentValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1297,19 +1152,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2alpha.ListRuntimesResponse.Runtime parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + stage_ = input.readEnum(); + + break; + } // case 16 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureWarningsIsMutable(); + warnings_.add(s); + break; + } // case 26 + case 32: + { + environment_ = input.readEnum(); + + break; + } // case 32 + case 42: + { + displayName_ = input.readStringRequireUtf8(); + + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2alpha.ListRuntimesResponse.Runtime) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1917,7 +1815,19 @@ public Runtime parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Runtime(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2031,7 +1941,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < runtimes_.size(); i++) { output.writeMessage(1, runtimes_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2043,7 +1953,7 @@ public int getSerializedSize() { for (int i = 0; i < runtimes_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, runtimes_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2060,7 +1970,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.functions.v2alpha.ListRuntimesResponse) obj; if (!getRuntimesList().equals(other.getRuntimesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2075,7 +1985,7 @@ public int hashCode() { hash = (37 * hash) + RUNTIMES_FIELD_NUMBER; hash = (53 * hash) + getRuntimesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2205,19 +2115,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2alpha.ListRuntimesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getRuntimesFieldBuilder(); - } } @java.lang.Override @@ -2225,10 +2126,11 @@ public Builder clear() { super.clear(); if (runtimesBuilder_ == null) { runtimes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + runtimes_ = null; runtimesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -2343,7 +2245,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2alpha.ListRuntimesResponse } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2358,18 +2260,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2alpha.ListRuntimesResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.functions.v2alpha.ListRuntimesResponse.Runtime m = + input.readMessage( + com.google.cloud.functions.v2alpha.ListRuntimesResponse.Runtime.parser(), + extensionRegistry); + if (runtimesBuilder_ == null) { + ensureRuntimesIsMutable(); + runtimes_.add(m); + } else { + runtimesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2alpha.ListRuntimesResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2793,7 +2722,18 @@ public ListRuntimesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRuntimesResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/OperationMetadata.java b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/OperationMetadata.java index 1841b4045d5c..58dac2c11ce4 100644 --- a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/OperationMetadata.java +++ b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/OperationMetadata.java @@ -56,138 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private OperationMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (endTime_ != null) { - subBuilder = endTime_.toBuilder(); - } - endTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTime_); - endTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - target_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - verb_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - statusDetail_ = s; - break; - } - case 48: - { - cancelRequested_ = input.readBool(); - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - apiVersion_ = s; - break; - } - case 66: - { - com.google.protobuf.Any.Builder subBuilder = null; - if (requestResource_ != null) { - subBuilder = requestResource_.toBuilder(); - } - requestResource_ = - input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(requestResource_); - requestResource_ = subBuilder.buildPartial(); - } - - break; - } - case 74: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - stages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - stages_.add( - input.readMessage( - com.google.cloud.functions.v2alpha.Stage.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - stages_ = java.util.Collections.unmodifiableList(stages_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2alpha.FunctionsProto .internal_static_google_cloud_functions_v2alpha_OperationMetadata_descriptor; @@ -670,7 +538,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < stages_.size(); i++) { output.writeMessage(9, stages_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -706,7 +574,7 @@ public int getSerializedSize() { for (int i = 0; i < stages_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, stages_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -740,7 +608,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestResource().equals(other.getRequestResource())) return false; } if (!getStagesList().equals(other.getStagesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -777,7 +645,7 @@ public int hashCode() { hash = (37 * hash) + STAGES_FIELD_NUMBER; hash = (53 * hash) + getStagesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -906,19 +774,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2alpha.OperationMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getStagesFieldBuilder(); - } } @java.lang.Override @@ -954,10 +813,11 @@ public Builder clear() { } if (stagesBuilder_ == null) { stages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + stages_ = null; stagesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -1120,7 +980,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2alpha.OperationMetadata ot } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1135,18 +995,92 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2alpha.OperationMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + target_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + verb_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + statusDetail_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 48: + { + cancelRequested_ = input.readBool(); + + break; + } // case 48 + case 58: + { + apiVersion_ = input.readStringRequireUtf8(); + + break; + } // case 58 + case 66: + { + input.readMessage(getRequestResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 66 + case 74: + { + com.google.cloud.functions.v2alpha.Stage m = + input.readMessage( + com.google.cloud.functions.v2alpha.Stage.parser(), extensionRegistry); + if (stagesBuilder_ == null) { + ensureStagesIsMutable(); + stages_.add(m); + } else { + stagesBuilder_.addMessage(m); + } + break; + } // case 74 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2alpha.OperationMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2562,7 +2496,18 @@ public OperationMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OperationMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/RepoSource.java b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/RepoSource.java index aa51dcaa6d49..775c3cfda716 100644 --- a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/RepoSource.java +++ b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/RepoSource.java @@ -54,92 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RepoSource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - projectId_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - repoName_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - revisionCase_ = 3; - revision_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - revisionCase_ = 4; - revision_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - revisionCase_ = 5; - revision_ = s; - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - dir_ = s; - break; - } - case 56: - { - invertRegex_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2alpha.FunctionsProto .internal_static_google_cloud_functions_v2alpha_RepoSource_descriptor; @@ -636,7 +550,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (invertRegex_ != false) { output.writeBool(7, invertRegex_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -666,7 +580,7 @@ public int getSerializedSize() { if (invertRegex_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, invertRegex_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -700,7 +614,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -735,7 +649,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -864,17 +778,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2alpha.RepoSource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1022,7 +929,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2alpha.RepoSource other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1037,17 +944,76 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2alpha.RepoSource parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + projectId_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + repoName_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + revisionCase_ = 3; + revision_ = s; + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + revisionCase_ = 4; + revision_ = s; + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + revisionCase_ = 5; + revision_ = s; + break; + } // case 42 + case 50: + { + dir_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 56: + { + invertRegex_ = input.readBool(); + + break; + } // case 56 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2alpha.RepoSource) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1916,7 +1882,18 @@ public RepoSource parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RepoSource(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/SecretEnvVar.java b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/SecretEnvVar.java index be76c36098d1..681d99206147 100644 --- a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/SecretEnvVar.java +++ b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/SecretEnvVar.java @@ -57,73 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecretEnvVar( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - key_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - projectId_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - secret_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - version_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2alpha.FunctionsProto .internal_static_google_cloud_functions_v2alpha_SecretEnvVar_descriptor; @@ -371,7 +304,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, version_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -392,7 +325,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, version_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -412,7 +345,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProjectId().equals(other.getProjectId())) return false; if (!getSecret().equals(other.getSecret())) return false; if (!getVersion().equals(other.getVersion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -431,7 +364,7 @@ public int hashCode() { hash = (53 * hash) + getSecret().hashCode(); hash = (37 * hash) + VERSION_FIELD_NUMBER; hash = (53 * hash) + getVersion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -562,17 +495,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2alpha.SecretEnvVar.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -683,7 +609,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2alpha.SecretEnvVar other) version_ = other.version_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -698,17 +624,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2alpha.SecretEnvVar parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + key_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + projectId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + secret_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + version_ = input.readStringRequireUtf8(); + + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2alpha.SecretEnvVar) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1193,7 +1157,18 @@ public SecretEnvVar parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecretEnvVar(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/SecretVolume.java b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/SecretVolume.java index 46554421953a..4eb7e825cd05 100644 --- a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/SecretVolume.java +++ b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/SecretVolume.java @@ -57,84 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecretVolume( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - mountPath_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - projectId_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - secret_ = s; - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - versions_ = - new java.util.ArrayList< - com.google.cloud.functions.v2alpha.SecretVolume.SecretVersion>(); - mutable_bitField0_ |= 0x00000001; - } - versions_.add( - input.readMessage( - com.google.cloud.functions.v2alpha.SecretVolume.SecretVersion.parser(), - extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - versions_ = java.util.Collections.unmodifiableList(versions_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2alpha.FunctionsProto .internal_static_google_cloud_functions_v2alpha_SecretVolume_descriptor; @@ -250,59 +172,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecretVersion( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - version_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - path_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2alpha.FunctionsProto .internal_static_google_cloud_functions_v2alpha_SecretVolume_SecretVersion_descriptor; @@ -446,7 +315,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, path_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -461,7 +330,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, path_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -479,7 +348,7 @@ public boolean equals(final java.lang.Object obj) { if (!getVersion().equals(other.getVersion())) return false; if (!getPath().equals(other.getPath())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -494,7 +363,7 @@ public int hashCode() { hash = (53 * hash) + getVersion().hashCode(); hash = (37 * hash) + PATH_FIELD_NUMBER; hash = (53 * hash) + getPath().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -626,17 +495,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2alpha.SecretVolume.SecretVersion.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -738,7 +600,7 @@ public Builder mergeFrom( path_ = other.path_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -753,19 +615,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2alpha.SecretVolume.SecretVersion parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + version_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + path_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2alpha.SecretVolume.SecretVersion) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1041,7 +927,19 @@ public SecretVersion parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecretVersion(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1328,7 +1226,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < versions_.size(); i++) { output.writeMessage(4, versions_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1349,7 +1247,7 @@ public int getSerializedSize() { for (int i = 0; i < versions_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, versions_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1369,7 +1267,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProjectId().equals(other.getProjectId())) return false; if (!getSecret().equals(other.getSecret())) return false; if (!getVersionsList().equals(other.getVersionsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1390,7 +1288,7 @@ public int hashCode() { hash = (37 * hash) + VERSIONS_FIELD_NUMBER; hash = (53 * hash) + getVersionsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1521,19 +1419,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2alpha.SecretVolume.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getVersionsFieldBuilder(); - } } @java.lang.Override @@ -1547,10 +1436,11 @@ public Builder clear() { if (versionsBuilder_ == null) { versions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + versions_ = null; versionsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -1680,7 +1570,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2alpha.SecretVolume other) } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1695,17 +1585,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2alpha.SecretVolume parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + mountPath_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + projectId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + secret_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + com.google.cloud.functions.v2alpha.SecretVolume.SecretVersion m = + input.readMessage( + com.google.cloud.functions.v2alpha.SecretVolume.SecretVersion.parser(), + extensionRegistry); + if (versionsBuilder_ == null) { + ensureVersionsIsMutable(); + versions_.add(m); + } else { + versionsBuilder_.addMessage(m); + } + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2alpha.SecretVolume) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2512,7 +2448,18 @@ public SecretVolume parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecretVolume(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/ServiceConfig.java b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/ServiceConfig.java index e3cb0b63767f..b74f43697d62 100644 --- a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/ServiceConfig.java +++ b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/ServiceConfig.java @@ -62,171 +62,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ServiceConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - service_ = s; - break; - } - case 16: - { - timeoutSeconds_ = input.readInt32(); - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - environmentVariables_ = - com.google.protobuf.MapField.newMapField( - EnvironmentVariablesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - environmentVariables__ = - input.readMessage( - EnvironmentVariablesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - environmentVariables_ - .getMutableMap() - .put(environmentVariables__.getKey(), environmentVariables__.getValue()); - break; - } - case 40: - { - maxInstanceCount_ = input.readInt32(); - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - vpcConnector_ = s; - break; - } - case 56: - { - int rawValue = input.readEnum(); - - vpcConnectorEgressSettings_ = rawValue; - break; - } - case 64: - { - int rawValue = input.readEnum(); - - ingressSettings_ = rawValue; - break; - } - case 74: - { - java.lang.String s = input.readStringRequireUtf8(); - - uri_ = s; - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - - serviceAccountEmail_ = s; - break; - } - case 96: - { - minInstanceCount_ = input.readInt32(); - break; - } - case 106: - { - java.lang.String s = input.readStringRequireUtf8(); - - availableMemory_ = s; - break; - } - case 128: - { - allTrafficOnLatestRevision_ = input.readBool(); - break; - } - case 138: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - secretEnvironmentVariables_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - secretEnvironmentVariables_.add( - input.readMessage( - com.google.cloud.functions.v2alpha.SecretEnvVar.parser(), extensionRegistry)); - break; - } - case 146: - { - java.lang.String s = input.readStringRequireUtf8(); - - revision_ = s; - break; - } - case 154: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - secretVolumes_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - secretVolumes_.add( - input.readMessage( - com.google.cloud.functions.v2alpha.SecretVolume.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000002) != 0)) { - secretEnvironmentVariables_ = - java.util.Collections.unmodifiableList(secretEnvironmentVariables_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - secretVolumes_ = java.util.Collections.unmodifiableList(secretVolumes_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2alpha.FunctionsProto .internal_static_google_cloud_functions_v2alpha_ServiceConfig_descriptor; @@ -1415,7 +1250,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < secretVolumes_.size(); i++) { output.writeMessage(19, secretVolumes_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1485,7 +1320,7 @@ public int getSerializedSize() { for (int i = 0; i < secretVolumes_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, secretVolumes_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1518,7 +1353,7 @@ public boolean equals(final java.lang.Object obj) { return false; if (!getSecretVolumesList().equals(other.getSecretVolumesList())) return false; if (!getRevision().equals(other.getRevision())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1565,7 +1400,7 @@ public int hashCode() { } hash = (37 * hash) + REVISION_FIELD_NUMBER; hash = (53 * hash) + getRevision().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1715,20 +1550,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.functions.v2alpha.ServiceConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getSecretEnvironmentVariablesFieldBuilder(); - getSecretVolumesFieldBuilder(); - } } @java.lang.Override @@ -1759,16 +1584,18 @@ public Builder clear() { if (secretEnvironmentVariablesBuilder_ == null) { secretEnvironmentVariables_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + secretEnvironmentVariables_ = null; secretEnvironmentVariablesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); if (secretVolumesBuilder_ == null) { secretVolumes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + secretVolumes_ = null; secretVolumesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); revision_ = ""; return this; @@ -1979,7 +1806,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2alpha.ServiceConfig other) revision_ = other.revision_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1994,17 +1821,143 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2alpha.ServiceConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + service_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + timeoutSeconds_ = input.readInt32(); + + break; + } // case 16 + case 34: + { + com.google.protobuf.MapEntry + environmentVariables__ = + input.readMessage( + EnvironmentVariablesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableEnvironmentVariables() + .getMutableMap() + .put(environmentVariables__.getKey(), environmentVariables__.getValue()); + break; + } // case 34 + case 40: + { + maxInstanceCount_ = input.readInt32(); + + break; + } // case 40 + case 50: + { + vpcConnector_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 56: + { + vpcConnectorEgressSettings_ = input.readEnum(); + + break; + } // case 56 + case 64: + { + ingressSettings_ = input.readEnum(); + + break; + } // case 64 + case 74: + { + uri_ = input.readStringRequireUtf8(); + + break; + } // case 74 + case 82: + { + serviceAccountEmail_ = input.readStringRequireUtf8(); + + break; + } // case 82 + case 96: + { + minInstanceCount_ = input.readInt32(); + + break; + } // case 96 + case 106: + { + availableMemory_ = input.readStringRequireUtf8(); + + break; + } // case 106 + case 128: + { + allTrafficOnLatestRevision_ = input.readBool(); + + break; + } // case 128 + case 138: + { + com.google.cloud.functions.v2alpha.SecretEnvVar m = + input.readMessage( + com.google.cloud.functions.v2alpha.SecretEnvVar.parser(), + extensionRegistry); + if (secretEnvironmentVariablesBuilder_ == null) { + ensureSecretEnvironmentVariablesIsMutable(); + secretEnvironmentVariables_.add(m); + } else { + secretEnvironmentVariablesBuilder_.addMessage(m); + } + break; + } // case 138 + case 146: + { + revision_ = input.readStringRequireUtf8(); + + break; + } // case 146 + case 154: + { + com.google.cloud.functions.v2alpha.SecretVolume m = + input.readMessage( + com.google.cloud.functions.v2alpha.SecretVolume.parser(), + extensionRegistry); + if (secretVolumesBuilder_ == null) { + ensureSecretVolumesIsMutable(); + secretVolumes_.add(m); + } else { + secretVolumesBuilder_.addMessage(m); + } + break; + } // case 154 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2alpha.ServiceConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4148,7 +4101,18 @@ public ServiceConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ServiceConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/Source.java b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/Source.java index 9c1953aa85f3..e4eaf0ca599c 100644 --- a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/Source.java +++ b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/Source.java @@ -50,78 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Source( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.functions.v2alpha.StorageSource.Builder subBuilder = null; - if (sourceCase_ == 1) { - subBuilder = - ((com.google.cloud.functions.v2alpha.StorageSource) source_).toBuilder(); - } - source_ = - input.readMessage( - com.google.cloud.functions.v2alpha.StorageSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.functions.v2alpha.StorageSource) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 1; - break; - } - case 18: - { - com.google.cloud.functions.v2alpha.RepoSource.Builder subBuilder = null; - if (sourceCase_ == 2) { - subBuilder = ((com.google.cloud.functions.v2alpha.RepoSource) source_).toBuilder(); - } - source_ = - input.readMessage( - com.google.cloud.functions.v2alpha.RepoSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.functions.v2alpha.RepoSource) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 2; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2alpha.FunctionsProto .internal_static_google_cloud_functions_v2alpha_Source_descriptor; @@ -309,7 +237,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (sourceCase_ == 2) { output.writeMessage(2, (com.google.cloud.functions.v2alpha.RepoSource) source_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -328,7 +256,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 2, (com.google.cloud.functions.v2alpha.RepoSource) source_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -355,7 +283,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -378,7 +306,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -507,22 +435,21 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2alpha.Source.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); + if (storageSourceBuilder_ != null) { + storageSourceBuilder_.clear(); + } + if (repoSourceBuilder_ != null) { + repoSourceBuilder_.clear(); + } sourceCase_ = 0; source_ = null; return this; @@ -632,7 +559,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2alpha.Source other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -647,17 +574,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2alpha.Source parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getStorageSourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(getRepoSourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2alpha.Source) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1136,7 +1089,18 @@ public Source parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Source(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/SourceProvenance.java b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/SourceProvenance.java index 8fba43353ab7..f0bfb8af408a 100644 --- a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/SourceProvenance.java +++ b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/SourceProvenance.java @@ -51,77 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SourceProvenance( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.functions.v2alpha.StorageSource.Builder subBuilder = null; - if (resolvedStorageSource_ != null) { - subBuilder = resolvedStorageSource_.toBuilder(); - } - resolvedStorageSource_ = - input.readMessage( - com.google.cloud.functions.v2alpha.StorageSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(resolvedStorageSource_); - resolvedStorageSource_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.cloud.functions.v2alpha.RepoSource.Builder subBuilder = null; - if (resolvedRepoSource_ != null) { - subBuilder = resolvedRepoSource_.toBuilder(); - } - resolvedRepoSource_ = - input.readMessage( - com.google.cloud.functions.v2alpha.RepoSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(resolvedRepoSource_); - resolvedRepoSource_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2alpha.FunctionsProto .internal_static_google_cloud_functions_v2alpha_SourceProvenance_descriptor; @@ -260,7 +189,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (resolvedRepoSource_ != null) { output.writeMessage(2, getResolvedRepoSource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -276,7 +205,7 @@ public int getSerializedSize() { if (resolvedRepoSource_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getResolvedRepoSource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -300,7 +229,7 @@ public boolean equals(final java.lang.Object obj) { if (hasResolvedRepoSource()) { if (!getResolvedRepoSource().equals(other.getResolvedRepoSource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -319,7 +248,7 @@ public int hashCode() { hash = (37 * hash) + RESOLVED_REPO_SOURCE_FIELD_NUMBER; hash = (53 * hash) + getResolvedRepoSource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -449,17 +378,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2alpha.SourceProvenance.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -570,7 +492,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2alpha.SourceProvenance oth if (other.hasResolvedRepoSource()) { mergeResolvedRepoSource(other.getResolvedRepoSource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -585,18 +507,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2alpha.SourceProvenance parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getResolvedStorageSourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage( + getResolvedRepoSourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2alpha.SourceProvenance) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1026,7 +975,18 @@ public SourceProvenance parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SourceProvenance(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/Stage.java b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/Stage.java index a72d37b4f601..91bfaa21e81a 100644 --- a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/Stage.java +++ b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/Stage.java @@ -57,96 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Stage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - int rawValue = input.readEnum(); - - name_ = rawValue; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - message_ = s; - break; - } - case 24: - { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - resourceUri_ = s; - break; - } - case 50: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - stateMessages_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - stateMessages_.add( - input.readMessage( - com.google.cloud.functions.v2alpha.StateMessage.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - stateMessages_ = java.util.Collections.unmodifiableList(stateMessages_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2alpha.FunctionsProto .internal_static_google_cloud_functions_v2alpha_Stage_descriptor; @@ -907,7 +817,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < stateMessages_.size(); i++) { output.writeMessage(6, stateMessages_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -934,7 +844,7 @@ public int getSerializedSize() { for (int i = 0; i < stateMessages_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, stateMessages_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -955,7 +865,7 @@ public boolean equals(final java.lang.Object obj) { if (!getResource().equals(other.getResource())) return false; if (!getResourceUri().equals(other.getResourceUri())) return false; if (!getStateMessagesList().equals(other.getStateMessagesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -980,7 +890,7 @@ public int hashCode() { hash = (37 * hash) + STATE_MESSAGES_FIELD_NUMBER; hash = (53 * hash) + getStateMessagesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1109,19 +1019,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2alpha.Stage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getStateMessagesFieldBuilder(); - } } @java.lang.Override @@ -1139,10 +1040,11 @@ public Builder clear() { if (stateMessagesBuilder_ == null) { stateMessages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + stateMessages_ = null; stateMessagesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -1279,7 +1181,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2alpha.Stage other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1294,17 +1196,75 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2alpha.Stage parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + name_ = input.readEnum(); + + break; + } // case 8 + case 18: + { + message_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + state_ = input.readEnum(); + + break; + } // case 24 + case 34: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + resourceUri_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: + { + com.google.cloud.functions.v2alpha.StateMessage m = + input.readMessage( + com.google.cloud.functions.v2alpha.StateMessage.parser(), + extensionRegistry); + if (stateMessagesBuilder_ == null) { + ensureStateMessagesIsMutable(); + stateMessages_.add(m); + } else { + stateMessagesBuilder_.addMessage(m); + } + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2alpha.Stage) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2202,7 +2162,18 @@ public Stage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Stage(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/StateMessage.java b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/StateMessage.java index 3e5d1753ef16..0de923f0435e 100644 --- a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/StateMessage.java +++ b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/StateMessage.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private StateMessage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - int rawValue = input.readEnum(); - - severity_ = rawValue; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - type_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - message_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2alpha.FunctionsProto .internal_static_google_cloud_functions_v2alpha_StateMessage_descriptor; @@ -469,7 +409,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, message_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -489,7 +429,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, message_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -508,7 +448,7 @@ public boolean equals(final java.lang.Object obj) { if (severity_ != other.severity_) return false; if (!getType().equals(other.getType())) return false; if (!getMessage().equals(other.getMessage())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -525,7 +465,7 @@ public int hashCode() { hash = (53 * hash) + getType().hashCode(); hash = (37 * hash) + MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getMessage().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -654,17 +594,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2alpha.StateMessage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -767,7 +700,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2alpha.StateMessage other) message_ = other.message_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -782,17 +715,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2alpha.StateMessage parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + severity_ = input.readEnum(); + + break; + } // case 8 + case 18: + { + type_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + message_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2alpha.StateMessage) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1133,7 +1098,18 @@ public StateMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new StateMessage(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/StorageSource.java b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/StorageSource.java index 2ede7a307b9f..4153036f578d 100644 --- a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/StorageSource.java +++ b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/StorageSource.java @@ -53,64 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private StorageSource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - bucket_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - object_ = s; - break; - } - case 24: - { - generation_ = input.readInt64(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2alpha.FunctionsProto .internal_static_google_cloud_functions_v2alpha_StorageSource_descriptor; @@ -274,7 +216,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (generation_ != 0L) { output.writeInt64(3, generation_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -292,7 +234,7 @@ public int getSerializedSize() { if (generation_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, generation_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -311,7 +253,7 @@ public boolean equals(final java.lang.Object obj) { if (!getBucket().equals(other.getBucket())) return false; if (!getObject().equals(other.getObject())) return false; if (getGeneration() != other.getGeneration()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -328,7 +270,7 @@ public int hashCode() { hash = (53 * hash) + getObject().hashCode(); hash = (37 * hash) + GENERATION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getGeneration()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -457,17 +399,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2alpha.StorageSource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -570,7 +505,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2alpha.StorageSource other) if (other.getGeneration() != 0L) { setGeneration(other.getGeneration()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -585,17 +520,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2alpha.StorageSource parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + bucket_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + object_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + generation_ = input.readInt64(); + + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2alpha.StorageSource) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -918,7 +885,18 @@ public StorageSource parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new StorageSource(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/UpdateFunctionRequest.java b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/UpdateFunctionRequest.java index 2d6af7a6377d..714b1f874067 100644 --- a/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/UpdateFunctionRequest.java +++ b/java-functions/proto-google-cloud-functions-v2alpha/src/main/java/com/google/cloud/functions/v2alpha/UpdateFunctionRequest.java @@ -50,76 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateFunctionRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.functions.v2alpha.Function.Builder subBuilder = null; - if (function_ != null) { - subBuilder = function_.toBuilder(); - } - function_ = - input.readMessage( - com.google.cloud.functions.v2alpha.Function.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(function_); - function_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2alpha.FunctionsProto .internal_static_google_cloud_functions_v2alpha_UpdateFunctionRequest_descriptor; @@ -261,7 +191,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateMask_ != null) { output.writeMessage(2, getUpdateMask()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -276,7 +206,7 @@ public int getSerializedSize() { if (updateMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -300,7 +230,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateMask()) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -319,7 +249,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; hash = (53 * hash) + getUpdateMask().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -449,17 +379,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2alpha.UpdateFunctionRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -570,7 +493,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2alpha.UpdateFunctionReques if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -585,18 +508,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2alpha.UpdateFunctionRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getFunctionFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2alpha.UpdateFunctionRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1037,7 +985,18 @@ public UpdateFunctionRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateFunctionRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/BuildConfig.java b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/BuildConfig.java index c5165e5ca3d5..a4043f16a170 100644 --- a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/BuildConfig.java +++ b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/BuildConfig.java @@ -57,132 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BuildConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - build_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - runtime_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - entryPoint_ = s; - break; - } - case 34: - { - com.google.cloud.functions.v2beta.Source.Builder subBuilder = null; - if (source_ != null) { - subBuilder = source_.toBuilder(); - } - source_ = - input.readMessage( - com.google.cloud.functions.v2beta.Source.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(source_); - source_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - workerPool_ = s; - break; - } - case 50: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - environmentVariables_ = - com.google.protobuf.MapField.newMapField( - EnvironmentVariablesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - environmentVariables__ = - input.readMessage( - EnvironmentVariablesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - environmentVariables_ - .getMutableMap() - .put(environmentVariables__.getKey(), environmentVariables__.getValue()); - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - dockerRepository_ = s; - break; - } - case 66: - { - com.google.cloud.functions.v2beta.SourceProvenance.Builder subBuilder = null; - if (sourceProvenance_ != null) { - subBuilder = sourceProvenance_.toBuilder(); - } - sourceProvenance_ = - input.readMessage( - com.google.cloud.functions.v2beta.SourceProvenance.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sourceProvenance_); - sourceProvenance_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2beta.FunctionsProto .internal_static_google_cloud_functions_v2beta_BuildConfig_descriptor; @@ -766,7 +640,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (sourceProvenance_ != null) { output.writeMessage(8, getSourceProvenance()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -806,7 +680,7 @@ public int getSerializedSize() { if (sourceProvenance_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getSourceProvenance()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -837,7 +711,7 @@ public boolean equals(final java.lang.Object obj) { if (!internalGetEnvironmentVariables().equals(other.internalGetEnvironmentVariables())) return false; if (!getDockerRepository().equals(other.getDockerRepository())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -870,7 +744,7 @@ public int hashCode() { } hash = (37 * hash) + DOCKER_REPOSITORY_FIELD_NUMBER; hash = (53 * hash) + getDockerRepository().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1020,17 +894,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.functions.v2beta.BuildConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1180,7 +1047,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2beta.BuildConfig other) { dockerRepository_ = other.dockerRepository_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1195,17 +1062,86 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2beta.BuildConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + build_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + runtime_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + entryPoint_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + input.readMessage(getSourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 42: + { + workerPool_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: + { + com.google.protobuf.MapEntry + environmentVariables__ = + input.readMessage( + EnvironmentVariablesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableEnvironmentVariables() + .getMutableMap() + .put(environmentVariables__.getKey(), environmentVariables__.getValue()); + break; + } // case 50 + case 58: + { + dockerRepository_ = input.readStringRequireUtf8(); + + break; + } // case 58 + case 66: + { + input.readMessage( + getSourceProvenanceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2beta.BuildConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2493,7 +2429,18 @@ public BuildConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BuildConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/CreateFunctionRequest.java b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/CreateFunctionRequest.java index 81761723e13e..bc12f8cec73e 100644 --- a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/CreateFunctionRequest.java +++ b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/CreateFunctionRequest.java @@ -53,75 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateFunctionRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: - { - com.google.cloud.functions.v2beta.Function.Builder subBuilder = null; - if (function_ != null) { - subBuilder = function_.toBuilder(); - } - function_ = - input.readMessage( - com.google.cloud.functions.v2beta.Function.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(function_); - function_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - functionId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2beta.FunctionsProto .internal_static_google_cloud_functions_v2beta_CreateFunctionRequest_descriptor; @@ -324,7 +255,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(functionId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, functionId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -342,7 +273,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(functionId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, functionId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -364,7 +295,7 @@ public boolean equals(final java.lang.Object obj) { if (!getFunction().equals(other.getFunction())) return false; } if (!getFunctionId().equals(other.getFunctionId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -383,7 +314,7 @@ public int hashCode() { } hash = (37 * hash) + FUNCTION_ID_FIELD_NUMBER; hash = (53 * hash) + getFunctionId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -513,17 +444,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2beta.CreateFunctionRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -634,7 +558,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2beta.CreateFunctionRequest functionId_ = other.functionId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -649,18 +573,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2beta.CreateFunctionRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getFunctionFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + functionId_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2beta.CreateFunctionRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1141,7 +1096,18 @@ public CreateFunctionRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateFunctionRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/DeleteFunctionRequest.java b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/DeleteFunctionRequest.java index f0e5948bfe1f..9baa72cfcc32 100644 --- a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/DeleteFunctionRequest.java +++ b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/DeleteFunctionRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteFunctionRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2beta.FunctionsProto .internal_static_google_cloud_functions_v2beta_DeleteFunctionRequest_descriptor; @@ -183,7 +137,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -195,7 +149,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -212,7 +166,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.functions.v2beta.DeleteFunctionRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -225,7 +179,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -355,17 +309,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2beta.DeleteFunctionRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -455,7 +402,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2beta.DeleteFunctionRequest name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -470,18 +417,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2beta.DeleteFunctionRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2beta.DeleteFunctionRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -633,7 +599,18 @@ public DeleteFunctionRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteFunctionRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/EventFilter.java b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/EventFilter.java index ba3b631ea96c..47451f101d9f 100644 --- a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/EventFilter.java +++ b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/EventFilter.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private EventFilter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - attribute_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - value_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - operator_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2beta.FunctionsProto .internal_static_google_cloud_functions_v2beta_EventFilter_descriptor; @@ -305,7 +245,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operator_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, operator_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -323,7 +263,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operator_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, operator_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -342,7 +282,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAttribute().equals(other.getAttribute())) return false; if (!getValue().equals(other.getValue())) return false; if (!getOperator().equals(other.getOperator())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -359,7 +299,7 @@ public int hashCode() { hash = (53 * hash) + getValue().hashCode(); hash = (37 * hash) + OPERATOR_FIELD_NUMBER; hash = (53 * hash) + getOperator().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -488,17 +428,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2beta.EventFilter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -601,7 +534,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2beta.EventFilter other) { operator_ = other.operator_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -616,17 +549,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2beta.EventFilter parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + attribute_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + value_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + operator_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2beta.EventFilter) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -995,7 +960,18 @@ public EventFilter parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new EventFilter(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/EventTrigger.java b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/EventTrigger.java index d699c52d7c54..3af0cc028b1b 100644 --- a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/EventTrigger.java +++ b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/EventTrigger.java @@ -60,110 +60,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private EventTrigger( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - trigger_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - triggerRegion_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - eventType_ = s; - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - eventFilters_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - eventFilters_.add( - input.readMessage( - com.google.cloud.functions.v2beta.EventFilter.parser(), extensionRegistry)); - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - pubsubTopic_ = s; - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - serviceAccountEmail_ = s; - break; - } - case 56: - { - int rawValue = input.readEnum(); - - retryPolicy_ = rawValue; - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - - channel_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - eventFilters_ = java.util.Collections.unmodifiableList(eventFilters_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2beta.FunctionsProto .internal_static_google_cloud_functions_v2beta_EventTrigger_descriptor; @@ -831,7 +727,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channel_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, channel_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -866,7 +762,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channel_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, channel_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -890,7 +786,7 @@ public boolean equals(final java.lang.Object obj) { if (!getServiceAccountEmail().equals(other.getServiceAccountEmail())) return false; if (retryPolicy_ != other.retryPolicy_) return false; if (!getChannel().equals(other.getChannel())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -919,7 +815,7 @@ public int hashCode() { hash = (53 * hash) + retryPolicy_; hash = (37 * hash) + CHANNEL_FIELD_NUMBER; hash = (53 * hash) + getChannel().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1049,19 +945,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2beta.EventTrigger.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getEventFiltersFieldBuilder(); - } } @java.lang.Override @@ -1075,10 +962,11 @@ public Builder clear() { if (eventFiltersBuilder_ == null) { eventFilters_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + eventFilters_ = null; eventFiltersBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); pubsubTopic_ = ""; serviceAccountEmail_ = ""; @@ -1234,7 +1122,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2beta.EventTrigger other) { channel_ = other.channel_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1249,17 +1137,86 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2beta.EventTrigger parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + trigger_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + triggerRegion_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + eventType_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + com.google.cloud.functions.v2beta.EventFilter m = + input.readMessage( + com.google.cloud.functions.v2beta.EventFilter.parser(), extensionRegistry); + if (eventFiltersBuilder_ == null) { + ensureEventFiltersIsMutable(); + eventFilters_.add(m); + } else { + eventFiltersBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + pubsubTopic_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: + { + serviceAccountEmail_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 56: + { + retryPolicy_ = input.readEnum(); + + break; + } // case 56 + case 66: + { + channel_ = input.readStringRequireUtf8(); + + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2beta.EventTrigger) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2504,7 +2461,18 @@ public EventTrigger parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new EventTrigger(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/Function.java b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/Function.java index 9074b95b0cbf..11c882aa8a9d 100644 --- a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/Function.java +++ b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/Function.java @@ -57,165 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Function( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 26: - { - com.google.cloud.functions.v2beta.BuildConfig.Builder subBuilder = null; - if (buildConfig_ != null) { - subBuilder = buildConfig_.toBuilder(); - } - buildConfig_ = - input.readMessage( - com.google.cloud.functions.v2beta.BuildConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(buildConfig_); - buildConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - com.google.cloud.functions.v2beta.ServiceConfig.Builder subBuilder = null; - if (serviceConfig_ != null) { - subBuilder = serviceConfig_.toBuilder(); - } - serviceConfig_ = - input.readMessage( - com.google.cloud.functions.v2beta.ServiceConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(serviceConfig_); - serviceConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - com.google.cloud.functions.v2beta.EventTrigger.Builder subBuilder = null; - if (eventTrigger_ != null) { - subBuilder = eventTrigger_.toBuilder(); - } - eventTrigger_ = - input.readMessage( - com.google.cloud.functions.v2beta.EventTrigger.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(eventTrigger_); - eventTrigger_ = subBuilder.buildPartial(); - } - - break; - } - case 48: - { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 58: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 66: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - break; - } - case 74: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - stateMessages_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - stateMessages_.add( - input.readMessage( - com.google.cloud.functions.v2beta.StateMessage.parser(), extensionRegistry)); - break; - } - case 80: - { - int rawValue = input.readEnum(); - - environment_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000002) != 0)) { - stateMessages_ = java.util.Collections.unmodifiableList(stateMessages_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2beta.FunctionsProto .internal_static_google_cloud_functions_v2beta_Function_descriptor; @@ -1067,7 +908,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io != com.google.cloud.functions.v2beta.Environment.ENVIRONMENT_UNSPECIFIED.getNumber()) { output.writeEnum(10, environment_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1114,7 +955,7 @@ public int getSerializedSize() { != com.google.cloud.functions.v2beta.Environment.ENVIRONMENT_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, environment_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1152,7 +993,7 @@ public boolean equals(final java.lang.Object obj) { } if (!internalGetLabels().equals(other.internalGetLabels())) return false; if (!getStateMessagesList().equals(other.getStateMessagesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1195,7 +1036,7 @@ public int hashCode() { hash = (37 * hash) + STATE_MESSAGES_FIELD_NUMBER; hash = (53 * hash) + getStateMessagesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1345,19 +1186,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.functions.v2beta.Function.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getStateMessagesFieldBuilder(); - } } @java.lang.Override @@ -1398,10 +1230,11 @@ public Builder clear() { internalGetMutableLabels().clear(); if (stateMessagesBuilder_ == null) { stateMessages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + stateMessages_ = null; stateMessagesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -1568,7 +1401,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2beta.Function other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1583,17 +1416,103 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2beta.Function parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getBuildConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + input.readMessage(getServiceConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 42: + { + input.readMessage(getEventTriggerFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 48: + { + state_ = input.readEnum(); + + break; + } // case 48 + case 58: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 58 + case 66: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 66 + case 74: + { + com.google.cloud.functions.v2beta.StateMessage m = + input.readMessage( + com.google.cloud.functions.v2beta.StateMessage.parser(), extensionRegistry); + if (stateMessagesBuilder_ == null) { + ensureStateMessagesIsMutable(); + stateMessages_.add(m); + } else { + stateMessagesBuilder_.addMessage(m); + } + break; + } // case 74 + case 80: + { + environment_ = input.readEnum(); + + break; + } // case 80 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2beta.Function) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3381,7 +3300,18 @@ public Function parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Function(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/GenerateDownloadUrlRequest.java b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/GenerateDownloadUrlRequest.java index b2ecc7019047..41abbb2f5a4a 100644 --- a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/GenerateDownloadUrlRequest.java +++ b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/GenerateDownloadUrlRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GenerateDownloadUrlRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2beta.FunctionsProto .internal_static_google_cloud_functions_v2beta_GenerateDownloadUrlRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.functions.v2beta.GenerateDownloadUrlRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -357,17 +311,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2beta.GenerateDownloadUrlRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -459,7 +406,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2beta.GenerateDownloadUrlRe name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -474,18 +421,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2beta.GenerateDownloadUrlRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2beta.GenerateDownloadUrlRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -643,7 +609,18 @@ public GenerateDownloadUrlRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GenerateDownloadUrlRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/GenerateDownloadUrlResponse.java b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/GenerateDownloadUrlResponse.java index ca2ce3bf102c..237d392b996c 100644 --- a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/GenerateDownloadUrlResponse.java +++ b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/GenerateDownloadUrlResponse.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GenerateDownloadUrlResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - downloadUrl_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2beta.FunctionsProto .internal_static_google_cloud_functions_v2beta_GenerateDownloadUrlResponse_descriptor; @@ -181,7 +135,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(downloadUrl_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, downloadUrl_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -193,7 +147,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(downloadUrl_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, downloadUrl_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -210,7 +164,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.functions.v2beta.GenerateDownloadUrlResponse) obj; if (!getDownloadUrl().equals(other.getDownloadUrl())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -223,7 +177,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + DOWNLOAD_URL_FIELD_NUMBER; hash = (53 * hash) + getDownloadUrl().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -353,17 +307,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2beta.GenerateDownloadUrlResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -455,7 +402,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2beta.GenerateDownloadUrlRe downloadUrl_ = other.downloadUrl_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -470,19 +417,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2beta.GenerateDownloadUrlResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + downloadUrl_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2beta.GenerateDownloadUrlResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -630,7 +595,18 @@ public GenerateDownloadUrlResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GenerateDownloadUrlResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/GenerateUploadUrlRequest.java b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/GenerateUploadUrlRequest.java index 44dc62e35a0f..fce9ab859b4a 100644 --- a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/GenerateUploadUrlRequest.java +++ b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/GenerateUploadUrlRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GenerateUploadUrlRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2beta.FunctionsProto .internal_static_google_cloud_functions_v2beta_GenerateUploadUrlRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.functions.v2beta.GenerateUploadUrlRequest) obj; if (!getParent().equals(other.getParent())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PARENT_FIELD_NUMBER; hash = (53 * hash) + getParent().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -357,17 +311,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2beta.GenerateUploadUrlRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -457,7 +404,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2beta.GenerateUploadUrlRequ parent_ = other.parent_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -472,18 +419,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2beta.GenerateUploadUrlRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2beta.GenerateUploadUrlRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -640,7 +606,18 @@ public GenerateUploadUrlRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GenerateUploadUrlRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/GenerateUploadUrlResponse.java b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/GenerateUploadUrlResponse.java index fae8cd202f76..1dfb7b32578d 100644 --- a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/GenerateUploadUrlResponse.java +++ b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/GenerateUploadUrlResponse.java @@ -52,68 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GenerateUploadUrlResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - uploadUrl_ = s; - break; - } - case 18: - { - com.google.cloud.functions.v2beta.StorageSource.Builder subBuilder = null; - if (storageSource_ != null) { - subBuilder = storageSource_.toBuilder(); - } - storageSource_ = - input.readMessage( - com.google.cloud.functions.v2beta.StorageSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(storageSource_); - storageSource_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2beta.FunctionsProto .internal_static_google_cloud_functions_v2beta_GenerateUploadUrlResponse_descriptor; @@ -265,7 +203,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (storageSource_ != null) { output.writeMessage(2, getStorageSource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -280,7 +218,7 @@ public int getSerializedSize() { if (storageSource_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStorageSource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -301,7 +239,7 @@ public boolean equals(final java.lang.Object obj) { if (hasStorageSource()) { if (!getStorageSource().equals(other.getStorageSource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -318,7 +256,7 @@ public int hashCode() { hash = (37 * hash) + STORAGE_SOURCE_FIELD_NUMBER; hash = (53 * hash) + getStorageSource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -448,17 +386,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2beta.GenerateUploadUrlResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -562,7 +493,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2beta.GenerateUploadUrlResp if (other.hasStorageSource()) { mergeStorageSource(other.getStorageSource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -577,18 +508,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2beta.GenerateUploadUrlResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + uploadUrl_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getStorageSourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2beta.GenerateUploadUrlResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -971,7 +927,18 @@ public GenerateUploadUrlResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GenerateUploadUrlResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/GetFunctionRequest.java b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/GetFunctionRequest.java index 0c37e6cafa50..886d31761ee2 100644 --- a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/GetFunctionRequest.java +++ b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/GetFunctionRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetFunctionRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2beta.FunctionsProto .internal_static_google_cloud_functions_v2beta_GetFunctionRequest_descriptor; @@ -183,7 +137,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -195,7 +149,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -212,7 +166,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.functions.v2beta.GetFunctionRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -225,7 +179,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -354,17 +308,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2beta.GetFunctionRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -454,7 +401,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2beta.GetFunctionRequest ot name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -469,18 +416,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2beta.GetFunctionRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2beta.GetFunctionRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -632,7 +598,18 @@ public GetFunctionRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetFunctionRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/ListFunctionsRequest.java b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/ListFunctionsRequest.java index f499d9e15d1c..21b49b2d3800 100644 --- a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/ListFunctionsRequest.java +++ b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/ListFunctionsRequest.java @@ -55,78 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListFunctionsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 16: - { - pageSize_ = input.readInt32(); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2beta.FunctionsProto .internal_static_google_cloud_functions_v2beta_ListFunctionsRequest_descriptor; @@ -411,7 +339,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -435,7 +363,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -456,7 +384,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPageToken().equals(other.getPageToken())) return false; if (!getFilter().equals(other.getFilter())) return false; if (!getOrderBy().equals(other.getOrderBy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -477,7 +405,7 @@ public int hashCode() { hash = (53 * hash) + getFilter().hashCode(); hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; hash = (53 * hash) + getOrderBy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -607,17 +535,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2beta.ListFunctionsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -734,7 +655,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2beta.ListFunctionsRequest orderBy_ = other.orderBy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -749,18 +670,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2beta.ListFunctionsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2beta.ListFunctionsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1337,7 +1301,18 @@ public ListFunctionsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListFunctionsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/ListFunctionsResponse.java b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/ListFunctionsResponse.java index 77841b33b657..d9948ae12a47 100644 --- a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/ListFunctionsResponse.java +++ b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/ListFunctionsResponse.java @@ -54,80 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListFunctionsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - functions_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - functions_.add( - input.readMessage( - com.google.cloud.functions.v2beta.Function.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - unreachable_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - functions_ = java.util.Collections.unmodifiableList(functions_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2beta.FunctionsProto .internal_static_google_cloud_functions_v2beta_ListFunctionsResponse_descriptor; @@ -351,7 +277,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < unreachable_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -374,7 +300,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getUnreachableList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -393,7 +319,7 @@ public boolean equals(final java.lang.Object obj) { if (!getFunctionsList().equals(other.getFunctionsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; if (!getUnreachableList().equals(other.getUnreachableList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -414,7 +340,7 @@ public int hashCode() { hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; hash = (53 * hash) + getUnreachableList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -544,19 +470,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2beta.ListFunctionsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getFunctionsFieldBuilder(); - } } @java.lang.Override @@ -564,10 +481,11 @@ public Builder clear() { super.clear(); if (functionsBuilder_ == null) { functions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + functions_ = null; functionsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; @@ -706,7 +624,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2beta.ListFunctionsResponse } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -721,18 +639,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2beta.ListFunctionsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.functions.v2beta.Function m = + input.readMessage( + com.google.cloud.functions.v2beta.Function.parser(), extensionRegistry); + if (functionsBuilder_ == null) { + ensureFunctionsIsMutable(); + functions_.add(m); + } else { + functionsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2beta.ListFunctionsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1409,7 +1366,18 @@ public ListFunctionsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListFunctionsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/ListRuntimesRequest.java b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/ListRuntimesRequest.java index 1b6c934f176f..d438241dde94 100644 --- a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/ListRuntimesRequest.java +++ b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/ListRuntimesRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRuntimesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2beta.FunctionsProto .internal_static_google_cloud_functions_v2beta_ListRuntimesRequest_descriptor; @@ -247,7 +194,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -262,7 +209,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -280,7 +227,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (!getFilter().equals(other.getFilter())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -295,7 +242,7 @@ public int hashCode() { hash = (53 * hash) + getParent().hashCode(); hash = (37 * hash) + FILTER_FIELD_NUMBER; hash = (53 * hash) + getFilter().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -425,17 +372,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2beta.ListRuntimesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -532,7 +472,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2beta.ListRuntimesRequest o filter_ = other.filter_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -547,18 +487,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2beta.ListRuntimesRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2beta.ListRuntimesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -826,7 +791,18 @@ public ListRuntimesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRuntimesRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/ListRuntimesResponse.java b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/ListRuntimesResponse.java index eb333862ed02..8f81512dc07a 100644 --- a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/ListRuntimesResponse.java +++ b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/ListRuntimesResponse.java @@ -52,63 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRuntimesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - runtimes_ = - new java.util.ArrayList< - com.google.cloud.functions.v2beta.ListRuntimesResponse.Runtime>(); - mutable_bitField0_ |= 0x00000001; - } - runtimes_.add( - input.readMessage( - com.google.cloud.functions.v2beta.ListRuntimesResponse.Runtime.parser(), - extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - runtimes_ = java.util.Collections.unmodifiableList(runtimes_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2beta.FunctionsProto .internal_static_google_cloud_functions_v2beta_ListRuntimesResponse_descriptor; @@ -566,87 +509,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Runtime( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 16: - { - int rawValue = input.readEnum(); - - stage_ = rawValue; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - warnings_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - warnings_.add(s); - break; - } - case 32: - { - int rawValue = input.readEnum(); - - environment_ = rawValue; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - warnings_ = warnings_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2beta.FunctionsProto .internal_static_google_cloud_functions_v2beta_ListRuntimesResponse_Runtime_descriptor; @@ -928,7 +790,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, displayName_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -961,7 +823,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, displayName_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -982,7 +844,7 @@ public boolean equals(final java.lang.Object obj) { if (stage_ != other.stage_) return false; if (!getWarningsList().equals(other.getWarningsList())) return false; if (environment_ != other.environment_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1005,7 +867,7 @@ public int hashCode() { } hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; hash = (53 * hash) + environment_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1138,17 +1000,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2beta.ListRuntimesResponse.Runtime.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1280,7 +1135,7 @@ public Builder mergeFrom( if (other.environment_ != 0) { setEnvironmentValue(other.getEnvironmentValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1295,19 +1150,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2beta.ListRuntimesResponse.Runtime parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + stage_ = input.readEnum(); + + break; + } // case 16 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureWarningsIsMutable(); + warnings_.add(s); + break; + } // case 26 + case 32: + { + environment_ = input.readEnum(); + + break; + } // case 32 + case 42: + { + displayName_ = input.readStringRequireUtf8(); + + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2beta.ListRuntimesResponse.Runtime) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1913,7 +1811,19 @@ public Runtime parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Runtime(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2022,7 +1932,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < runtimes_.size(); i++) { output.writeMessage(1, runtimes_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2034,7 +1944,7 @@ public int getSerializedSize() { for (int i = 0; i < runtimes_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, runtimes_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2051,7 +1961,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.functions.v2beta.ListRuntimesResponse) obj; if (!getRuntimesList().equals(other.getRuntimesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2066,7 +1976,7 @@ public int hashCode() { hash = (37 * hash) + RUNTIMES_FIELD_NUMBER; hash = (53 * hash) + getRuntimesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2196,19 +2106,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2beta.ListRuntimesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getRuntimesFieldBuilder(); - } } @java.lang.Override @@ -2216,10 +2117,11 @@ public Builder clear() { super.clear(); if (runtimesBuilder_ == null) { runtimes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + runtimes_ = null; runtimesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -2334,7 +2236,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2beta.ListRuntimesResponse } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2349,18 +2251,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2beta.ListRuntimesResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.functions.v2beta.ListRuntimesResponse.Runtime m = + input.readMessage( + com.google.cloud.functions.v2beta.ListRuntimesResponse.Runtime.parser(), + extensionRegistry); + if (runtimesBuilder_ == null) { + ensureRuntimesIsMutable(); + runtimes_.add(m); + } else { + runtimesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2beta.ListRuntimesResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2783,7 +2712,18 @@ public ListRuntimesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRuntimesResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/OperationMetadata.java b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/OperationMetadata.java index bd1153527908..f7e2559183ef 100644 --- a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/OperationMetadata.java +++ b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/OperationMetadata.java @@ -56,138 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private OperationMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (endTime_ != null) { - subBuilder = endTime_.toBuilder(); - } - endTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTime_); - endTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - target_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - verb_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - statusDetail_ = s; - break; - } - case 48: - { - cancelRequested_ = input.readBool(); - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - apiVersion_ = s; - break; - } - case 66: - { - com.google.protobuf.Any.Builder subBuilder = null; - if (requestResource_ != null) { - subBuilder = requestResource_.toBuilder(); - } - requestResource_ = - input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(requestResource_); - requestResource_ = subBuilder.buildPartial(); - } - - break; - } - case 74: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - stages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - stages_.add( - input.readMessage( - com.google.cloud.functions.v2beta.Stage.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - stages_ = java.util.Collections.unmodifiableList(stages_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2beta.FunctionsProto .internal_static_google_cloud_functions_v2beta_OperationMetadata_descriptor; @@ -670,7 +538,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < stages_.size(); i++) { output.writeMessage(9, stages_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -706,7 +574,7 @@ public int getSerializedSize() { for (int i = 0; i < stages_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, stages_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -740,7 +608,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestResource().equals(other.getRequestResource())) return false; } if (!getStagesList().equals(other.getStagesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -777,7 +645,7 @@ public int hashCode() { hash = (37 * hash) + STAGES_FIELD_NUMBER; hash = (53 * hash) + getStagesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -906,19 +774,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2beta.OperationMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getStagesFieldBuilder(); - } } @java.lang.Override @@ -954,10 +813,11 @@ public Builder clear() { } if (stagesBuilder_ == null) { stages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + stages_ = null; stagesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -1120,7 +980,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2beta.OperationMetadata oth } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1135,18 +995,92 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2beta.OperationMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + target_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + verb_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + statusDetail_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 48: + { + cancelRequested_ = input.readBool(); + + break; + } // case 48 + case 58: + { + apiVersion_ = input.readStringRequireUtf8(); + + break; + } // case 58 + case 66: + { + input.readMessage(getRequestResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 66 + case 74: + { + com.google.cloud.functions.v2beta.Stage m = + input.readMessage( + com.google.cloud.functions.v2beta.Stage.parser(), extensionRegistry); + if (stagesBuilder_ == null) { + ensureStagesIsMutable(); + stages_.add(m); + } else { + stagesBuilder_.addMessage(m); + } + break; + } // case 74 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2beta.OperationMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2562,7 +2496,18 @@ public OperationMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OperationMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/RepoSource.java b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/RepoSource.java index 8071eeaa57bd..db09109c286a 100644 --- a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/RepoSource.java +++ b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/RepoSource.java @@ -54,92 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RepoSource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - projectId_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - repoName_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - revisionCase_ = 3; - revision_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - revisionCase_ = 4; - revision_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - revisionCase_ = 5; - revision_ = s; - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - dir_ = s; - break; - } - case 56: - { - invertRegex_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2beta.FunctionsProto .internal_static_google_cloud_functions_v2beta_RepoSource_descriptor; @@ -636,7 +550,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (invertRegex_ != false) { output.writeBool(7, invertRegex_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -666,7 +580,7 @@ public int getSerializedSize() { if (invertRegex_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, invertRegex_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -700,7 +614,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -735,7 +649,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -864,17 +778,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2beta.RepoSource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1022,7 +929,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2beta.RepoSource other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1037,17 +944,76 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2beta.RepoSource parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + projectId_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + repoName_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + revisionCase_ = 3; + revision_ = s; + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + revisionCase_ = 4; + revision_ = s; + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + revisionCase_ = 5; + revision_ = s; + break; + } // case 42 + case 50: + { + dir_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 56: + { + invertRegex_ = input.readBool(); + + break; + } // case 56 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2beta.RepoSource) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1916,7 +1882,18 @@ public RepoSource parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RepoSource(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/SecretEnvVar.java b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/SecretEnvVar.java index 162e600c9bb9..32bca16a1a8e 100644 --- a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/SecretEnvVar.java +++ b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/SecretEnvVar.java @@ -57,73 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecretEnvVar( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - key_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - projectId_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - secret_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - version_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2beta.FunctionsProto .internal_static_google_cloud_functions_v2beta_SecretEnvVar_descriptor; @@ -371,7 +304,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, version_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -392,7 +325,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, version_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -412,7 +345,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProjectId().equals(other.getProjectId())) return false; if (!getSecret().equals(other.getSecret())) return false; if (!getVersion().equals(other.getVersion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -431,7 +364,7 @@ public int hashCode() { hash = (53 * hash) + getSecret().hashCode(); hash = (37 * hash) + VERSION_FIELD_NUMBER; hash = (53 * hash) + getVersion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -562,17 +495,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2beta.SecretEnvVar.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -682,7 +608,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2beta.SecretEnvVar other) { version_ = other.version_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -697,17 +623,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2beta.SecretEnvVar parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + key_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + projectId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + secret_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + version_ = input.readStringRequireUtf8(); + + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2beta.SecretEnvVar) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1192,7 +1156,18 @@ public SecretEnvVar parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecretEnvVar(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/SecretVolume.java b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/SecretVolume.java index 56eef89d7752..6a0baf0db0ab 100644 --- a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/SecretVolume.java +++ b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/SecretVolume.java @@ -57,84 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecretVolume( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - mountPath_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - projectId_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - secret_ = s; - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - versions_ = - new java.util.ArrayList< - com.google.cloud.functions.v2beta.SecretVolume.SecretVersion>(); - mutable_bitField0_ |= 0x00000001; - } - versions_.add( - input.readMessage( - com.google.cloud.functions.v2beta.SecretVolume.SecretVersion.parser(), - extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - versions_ = java.util.Collections.unmodifiableList(versions_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2beta.FunctionsProto .internal_static_google_cloud_functions_v2beta_SecretVolume_descriptor; @@ -250,59 +172,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecretVersion( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - version_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - path_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2beta.FunctionsProto .internal_static_google_cloud_functions_v2beta_SecretVolume_SecretVersion_descriptor; @@ -446,7 +315,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, path_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -461,7 +330,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, path_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -479,7 +348,7 @@ public boolean equals(final java.lang.Object obj) { if (!getVersion().equals(other.getVersion())) return false; if (!getPath().equals(other.getPath())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -494,7 +363,7 @@ public int hashCode() { hash = (53 * hash) + getVersion().hashCode(); hash = (37 * hash) + PATH_FIELD_NUMBER; hash = (53 * hash) + getPath().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -626,17 +495,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2beta.SecretVolume.SecretVersion.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -737,7 +599,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2beta.SecretVolume.SecretVe path_ = other.path_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -752,19 +614,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2beta.SecretVolume.SecretVersion parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + version_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + path_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2beta.SecretVolume.SecretVersion) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1040,7 +926,19 @@ public SecretVersion parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecretVersion(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1327,7 +1225,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < versions_.size(); i++) { output.writeMessage(4, versions_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1348,7 +1246,7 @@ public int getSerializedSize() { for (int i = 0; i < versions_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, versions_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1368,7 +1266,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProjectId().equals(other.getProjectId())) return false; if (!getSecret().equals(other.getSecret())) return false; if (!getVersionsList().equals(other.getVersionsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1389,7 +1287,7 @@ public int hashCode() { hash = (37 * hash) + VERSIONS_FIELD_NUMBER; hash = (53 * hash) + getVersionsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1520,19 +1418,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2beta.SecretVolume.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getVersionsFieldBuilder(); - } } @java.lang.Override @@ -1546,10 +1435,11 @@ public Builder clear() { if (versionsBuilder_ == null) { versions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + versions_ = null; versionsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -1678,7 +1568,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2beta.SecretVolume other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1693,17 +1583,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2beta.SecretVolume parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + mountPath_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + projectId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + secret_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + com.google.cloud.functions.v2beta.SecretVolume.SecretVersion m = + input.readMessage( + com.google.cloud.functions.v2beta.SecretVolume.SecretVersion.parser(), + extensionRegistry); + if (versionsBuilder_ == null) { + ensureVersionsIsMutable(); + versions_.add(m); + } else { + versionsBuilder_.addMessage(m); + } + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2beta.SecretVolume) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2491,7 +2427,18 @@ public SecretVolume parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecretVolume(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/ServiceConfig.java b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/ServiceConfig.java index e0d6a335b735..07fe154e3587 100644 --- a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/ServiceConfig.java +++ b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/ServiceConfig.java @@ -62,171 +62,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ServiceConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - service_ = s; - break; - } - case 16: - { - timeoutSeconds_ = input.readInt32(); - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - environmentVariables_ = - com.google.protobuf.MapField.newMapField( - EnvironmentVariablesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - environmentVariables__ = - input.readMessage( - EnvironmentVariablesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - environmentVariables_ - .getMutableMap() - .put(environmentVariables__.getKey(), environmentVariables__.getValue()); - break; - } - case 40: - { - maxInstanceCount_ = input.readInt32(); - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - vpcConnector_ = s; - break; - } - case 56: - { - int rawValue = input.readEnum(); - - vpcConnectorEgressSettings_ = rawValue; - break; - } - case 64: - { - int rawValue = input.readEnum(); - - ingressSettings_ = rawValue; - break; - } - case 74: - { - java.lang.String s = input.readStringRequireUtf8(); - - uri_ = s; - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - - serviceAccountEmail_ = s; - break; - } - case 96: - { - minInstanceCount_ = input.readInt32(); - break; - } - case 106: - { - java.lang.String s = input.readStringRequireUtf8(); - - availableMemory_ = s; - break; - } - case 128: - { - allTrafficOnLatestRevision_ = input.readBool(); - break; - } - case 138: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - secretEnvironmentVariables_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - secretEnvironmentVariables_.add( - input.readMessage( - com.google.cloud.functions.v2beta.SecretEnvVar.parser(), extensionRegistry)); - break; - } - case 146: - { - java.lang.String s = input.readStringRequireUtf8(); - - revision_ = s; - break; - } - case 154: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - secretVolumes_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - secretVolumes_.add( - input.readMessage( - com.google.cloud.functions.v2beta.SecretVolume.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000002) != 0)) { - secretEnvironmentVariables_ = - java.util.Collections.unmodifiableList(secretEnvironmentVariables_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - secretVolumes_ = java.util.Collections.unmodifiableList(secretVolumes_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2beta.FunctionsProto .internal_static_google_cloud_functions_v2beta_ServiceConfig_descriptor; @@ -1413,7 +1248,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < secretVolumes_.size(); i++) { output.writeMessage(19, secretVolumes_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1483,7 +1318,7 @@ public int getSerializedSize() { for (int i = 0; i < secretVolumes_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, secretVolumes_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1516,7 +1351,7 @@ public boolean equals(final java.lang.Object obj) { return false; if (!getSecretVolumesList().equals(other.getSecretVolumesList())) return false; if (!getRevision().equals(other.getRevision())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1563,7 +1398,7 @@ public int hashCode() { } hash = (37 * hash) + REVISION_FIELD_NUMBER; hash = (53 * hash) + getRevision().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1713,20 +1548,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.functions.v2beta.ServiceConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getSecretEnvironmentVariablesFieldBuilder(); - getSecretVolumesFieldBuilder(); - } } @java.lang.Override @@ -1757,16 +1582,18 @@ public Builder clear() { if (secretEnvironmentVariablesBuilder_ == null) { secretEnvironmentVariables_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + secretEnvironmentVariables_ = null; secretEnvironmentVariablesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); if (secretVolumesBuilder_ == null) { secretVolumes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + secretVolumes_ = null; secretVolumesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); revision_ = ""; return this; @@ -1977,7 +1804,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2beta.ServiceConfig other) revision_ = other.revision_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1992,17 +1819,141 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2beta.ServiceConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + service_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + timeoutSeconds_ = input.readInt32(); + + break; + } // case 16 + case 34: + { + com.google.protobuf.MapEntry + environmentVariables__ = + input.readMessage( + EnvironmentVariablesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableEnvironmentVariables() + .getMutableMap() + .put(environmentVariables__.getKey(), environmentVariables__.getValue()); + break; + } // case 34 + case 40: + { + maxInstanceCount_ = input.readInt32(); + + break; + } // case 40 + case 50: + { + vpcConnector_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 56: + { + vpcConnectorEgressSettings_ = input.readEnum(); + + break; + } // case 56 + case 64: + { + ingressSettings_ = input.readEnum(); + + break; + } // case 64 + case 74: + { + uri_ = input.readStringRequireUtf8(); + + break; + } // case 74 + case 82: + { + serviceAccountEmail_ = input.readStringRequireUtf8(); + + break; + } // case 82 + case 96: + { + minInstanceCount_ = input.readInt32(); + + break; + } // case 96 + case 106: + { + availableMemory_ = input.readStringRequireUtf8(); + + break; + } // case 106 + case 128: + { + allTrafficOnLatestRevision_ = input.readBool(); + + break; + } // case 128 + case 138: + { + com.google.cloud.functions.v2beta.SecretEnvVar m = + input.readMessage( + com.google.cloud.functions.v2beta.SecretEnvVar.parser(), extensionRegistry); + if (secretEnvironmentVariablesBuilder_ == null) { + ensureSecretEnvironmentVariablesIsMutable(); + secretEnvironmentVariables_.add(m); + } else { + secretEnvironmentVariablesBuilder_.addMessage(m); + } + break; + } // case 138 + case 146: + { + revision_ = input.readStringRequireUtf8(); + + break; + } // case 146 + case 154: + { + com.google.cloud.functions.v2beta.SecretVolume m = + input.readMessage( + com.google.cloud.functions.v2beta.SecretVolume.parser(), extensionRegistry); + if (secretVolumesBuilder_ == null) { + ensureSecretVolumesIsMutable(); + secretVolumes_.add(m); + } else { + secretVolumesBuilder_.addMessage(m); + } + break; + } // case 154 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2beta.ServiceConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4125,7 +4076,18 @@ public ServiceConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ServiceConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/Source.java b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/Source.java index 920a9f77bde8..c83dd6f1dc0d 100644 --- a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/Source.java +++ b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/Source.java @@ -50,78 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Source( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.functions.v2beta.StorageSource.Builder subBuilder = null; - if (sourceCase_ == 1) { - subBuilder = - ((com.google.cloud.functions.v2beta.StorageSource) source_).toBuilder(); - } - source_ = - input.readMessage( - com.google.cloud.functions.v2beta.StorageSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.functions.v2beta.StorageSource) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 1; - break; - } - case 18: - { - com.google.cloud.functions.v2beta.RepoSource.Builder subBuilder = null; - if (sourceCase_ == 2) { - subBuilder = ((com.google.cloud.functions.v2beta.RepoSource) source_).toBuilder(); - } - source_ = - input.readMessage( - com.google.cloud.functions.v2beta.RepoSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.functions.v2beta.RepoSource) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 2; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2beta.FunctionsProto .internal_static_google_cloud_functions_v2beta_Source_descriptor; @@ -309,7 +237,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (sourceCase_ == 2) { output.writeMessage(2, (com.google.cloud.functions.v2beta.RepoSource) source_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -328,7 +256,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 2, (com.google.cloud.functions.v2beta.RepoSource) source_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -354,7 +282,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -377,7 +305,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -506,22 +434,21 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2beta.Source.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); + if (storageSourceBuilder_ != null) { + storageSourceBuilder_.clear(); + } + if (repoSourceBuilder_ != null) { + repoSourceBuilder_.clear(); + } sourceCase_ = 0; source_ = null; return this; @@ -631,7 +558,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2beta.Source other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -646,17 +573,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2beta.Source parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getStorageSourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(getRepoSourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2beta.Source) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1135,7 +1088,18 @@ public Source parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Source(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/SourceProvenance.java b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/SourceProvenance.java index 03846b0bae11..7f6fffaa779d 100644 --- a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/SourceProvenance.java +++ b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/SourceProvenance.java @@ -51,77 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SourceProvenance( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.functions.v2beta.StorageSource.Builder subBuilder = null; - if (resolvedStorageSource_ != null) { - subBuilder = resolvedStorageSource_.toBuilder(); - } - resolvedStorageSource_ = - input.readMessage( - com.google.cloud.functions.v2beta.StorageSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(resolvedStorageSource_); - resolvedStorageSource_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.cloud.functions.v2beta.RepoSource.Builder subBuilder = null; - if (resolvedRepoSource_ != null) { - subBuilder = resolvedRepoSource_.toBuilder(); - } - resolvedRepoSource_ = - input.readMessage( - com.google.cloud.functions.v2beta.RepoSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(resolvedRepoSource_); - resolvedRepoSource_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2beta.FunctionsProto .internal_static_google_cloud_functions_v2beta_SourceProvenance_descriptor; @@ -260,7 +189,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (resolvedRepoSource_ != null) { output.writeMessage(2, getResolvedRepoSource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -276,7 +205,7 @@ public int getSerializedSize() { if (resolvedRepoSource_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getResolvedRepoSource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -300,7 +229,7 @@ public boolean equals(final java.lang.Object obj) { if (hasResolvedRepoSource()) { if (!getResolvedRepoSource().equals(other.getResolvedRepoSource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -319,7 +248,7 @@ public int hashCode() { hash = (37 * hash) + RESOLVED_REPO_SOURCE_FIELD_NUMBER; hash = (53 * hash) + getResolvedRepoSource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -449,17 +378,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2beta.SourceProvenance.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -570,7 +492,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2beta.SourceProvenance othe if (other.hasResolvedRepoSource()) { mergeResolvedRepoSource(other.getResolvedRepoSource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -585,18 +507,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2beta.SourceProvenance parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getResolvedStorageSourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage( + getResolvedRepoSourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2beta.SourceProvenance) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1025,7 +974,18 @@ public SourceProvenance parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SourceProvenance(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/Stage.java b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/Stage.java index cd13ddb0bb8c..bc67e1942e17 100644 --- a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/Stage.java +++ b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/Stage.java @@ -57,96 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Stage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - int rawValue = input.readEnum(); - - name_ = rawValue; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - message_ = s; - break; - } - case 24: - { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - resourceUri_ = s; - break; - } - case 50: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - stateMessages_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - stateMessages_.add( - input.readMessage( - com.google.cloud.functions.v2beta.StateMessage.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - stateMessages_ = java.util.Collections.unmodifiableList(stateMessages_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2beta.FunctionsProto .internal_static_google_cloud_functions_v2beta_Stage_descriptor; @@ -907,7 +817,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < stateMessages_.size(); i++) { output.writeMessage(6, stateMessages_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -934,7 +844,7 @@ public int getSerializedSize() { for (int i = 0; i < stateMessages_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, stateMessages_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -955,7 +865,7 @@ public boolean equals(final java.lang.Object obj) { if (!getResource().equals(other.getResource())) return false; if (!getResourceUri().equals(other.getResourceUri())) return false; if (!getStateMessagesList().equals(other.getStateMessagesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -980,7 +890,7 @@ public int hashCode() { hash = (37 * hash) + STATE_MESSAGES_FIELD_NUMBER; hash = (53 * hash) + getStateMessagesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1109,19 +1019,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2beta.Stage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getStateMessagesFieldBuilder(); - } } @java.lang.Override @@ -1139,10 +1040,11 @@ public Builder clear() { if (stateMessagesBuilder_ == null) { stateMessages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + stateMessages_ = null; stateMessagesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -1279,7 +1181,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2beta.Stage other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1294,17 +1196,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2beta.Stage parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + name_ = input.readEnum(); + + break; + } // case 8 + case 18: + { + message_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + state_ = input.readEnum(); + + break; + } // case 24 + case 34: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + resourceUri_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: + { + com.google.cloud.functions.v2beta.StateMessage m = + input.readMessage( + com.google.cloud.functions.v2beta.StateMessage.parser(), extensionRegistry); + if (stateMessagesBuilder_ == null) { + ensureStateMessagesIsMutable(); + stateMessages_.add(m); + } else { + stateMessagesBuilder_.addMessage(m); + } + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2beta.Stage) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2201,7 +2160,18 @@ public Stage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Stage(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/StateMessage.java b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/StateMessage.java index 4ec960aa9b62..d55544b0add6 100644 --- a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/StateMessage.java +++ b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/StateMessage.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private StateMessage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - int rawValue = input.readEnum(); - - severity_ = rawValue; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - type_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - message_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2beta.FunctionsProto .internal_static_google_cloud_functions_v2beta_StateMessage_descriptor; @@ -469,7 +409,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, message_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -489,7 +429,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, message_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -508,7 +448,7 @@ public boolean equals(final java.lang.Object obj) { if (severity_ != other.severity_) return false; if (!getType().equals(other.getType())) return false; if (!getMessage().equals(other.getMessage())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -525,7 +465,7 @@ public int hashCode() { hash = (53 * hash) + getType().hashCode(); hash = (37 * hash) + MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getMessage().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -654,17 +594,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2beta.StateMessage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -766,7 +699,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2beta.StateMessage other) { message_ = other.message_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -781,17 +714,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2beta.StateMessage parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + severity_ = input.readEnum(); + + break; + } // case 8 + case 18: + { + type_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + message_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2beta.StateMessage) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1132,7 +1097,18 @@ public StateMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new StateMessage(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/StorageSource.java b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/StorageSource.java index f99dec2b3a7b..dc5d94560fbe 100644 --- a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/StorageSource.java +++ b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/StorageSource.java @@ -53,64 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private StorageSource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - bucket_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - object_ = s; - break; - } - case 24: - { - generation_ = input.readInt64(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2beta.FunctionsProto .internal_static_google_cloud_functions_v2beta_StorageSource_descriptor; @@ -274,7 +216,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (generation_ != 0L) { output.writeInt64(3, generation_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -292,7 +234,7 @@ public int getSerializedSize() { if (generation_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, generation_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -311,7 +253,7 @@ public boolean equals(final java.lang.Object obj) { if (!getBucket().equals(other.getBucket())) return false; if (!getObject().equals(other.getObject())) return false; if (getGeneration() != other.getGeneration()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -328,7 +270,7 @@ public int hashCode() { hash = (53 * hash) + getObject().hashCode(); hash = (37 * hash) + GENERATION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getGeneration()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -457,17 +399,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2beta.StorageSource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -570,7 +505,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2beta.StorageSource other) if (other.getGeneration() != 0L) { setGeneration(other.getGeneration()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -585,17 +520,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2beta.StorageSource parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + bucket_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + object_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + generation_ = input.readInt64(); + + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.functions.v2beta.StorageSource) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -918,7 +885,18 @@ public StorageSource parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new StorageSource(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/UpdateFunctionRequest.java b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/UpdateFunctionRequest.java index 3c236b7e0cb2..b9ca8b733ae0 100644 --- a/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/UpdateFunctionRequest.java +++ b/java-functions/proto-google-cloud-functions-v2beta/src/main/java/com/google/cloud/functions/v2beta/UpdateFunctionRequest.java @@ -50,76 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateFunctionRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.functions.v2beta.Function.Builder subBuilder = null; - if (function_ != null) { - subBuilder = function_.toBuilder(); - } - function_ = - input.readMessage( - com.google.cloud.functions.v2beta.Function.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(function_); - function_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.functions.v2beta.FunctionsProto .internal_static_google_cloud_functions_v2beta_UpdateFunctionRequest_descriptor; @@ -261,7 +191,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateMask_ != null) { output.writeMessage(2, getUpdateMask()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -276,7 +206,7 @@ public int getSerializedSize() { if (updateMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -300,7 +230,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateMask()) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -319,7 +249,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; hash = (53 * hash) + getUpdateMask().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -449,17 +379,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.functions.v2beta.UpdateFunctionRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -570,7 +493,7 @@ public Builder mergeFrom(com.google.cloud.functions.v2beta.UpdateFunctionRequest if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -585,18 +508,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.functions.v2beta.UpdateFunctionRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getFunctionFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.functions.v2beta.UpdateFunctionRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1036,7 +984,18 @@ public UpdateFunctionRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateFunctionRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } };