Class ApiVersion.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<ApiVersion.Builder>
com.google.cloud.apigeeregistry.v1.ApiVersion.Builder
All Implemented Interfaces:
ApiVersionOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
ApiVersion

public static final class ApiVersion.Builder extends com.google.protobuf.GeneratedMessage.Builder<ApiVersion.Builder> implements ApiVersionOrBuilder
 Describes a particular version of an API.
 ApiVersions are what consumers actually use.
 
Protobuf type google.cloud.apigeeregistry.v1.ApiVersion
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<ApiVersion.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<ApiVersion.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<ApiVersion.Builder>
    • clear

      public ApiVersion.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<ApiVersion.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<ApiVersion.Builder>
    • getDefaultInstanceForType

      public ApiVersion getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public ApiVersion build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public ApiVersion buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public ApiVersion.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ApiVersion.Builder>
    • mergeFrom

      public ApiVersion.Builder mergeFrom(ApiVersion other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<ApiVersion.Builder>
    • mergeFrom

      public ApiVersion.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ApiVersion.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       Resource name.
       
      string name = 1;
      Specified by:
      getName in interface ApiVersionOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Resource name.
       
      string name = 1;
      Specified by:
      getNameBytes in interface ApiVersionOrBuilder
      Returns:
      The bytes for name.
    • setName

      public ApiVersion.Builder setName(String value)
       Resource name.
       
      string name = 1;
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public ApiVersion.Builder clearName()
       Resource name.
       
      string name = 1;
      Returns:
      This builder for chaining.
    • setNameBytes

      public ApiVersion.Builder setNameBytes(com.google.protobuf.ByteString value)
       Resource name.
       
      string name = 1;
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getDisplayName

      public String getDisplayName()
       Human-meaningful name.
       
      string display_name = 2;
      Specified by:
      getDisplayName in interface ApiVersionOrBuilder
      Returns:
      The displayName.
    • getDisplayNameBytes

      public com.google.protobuf.ByteString getDisplayNameBytes()
       Human-meaningful name.
       
      string display_name = 2;
      Specified by:
      getDisplayNameBytes in interface ApiVersionOrBuilder
      Returns:
      The bytes for displayName.
    • setDisplayName

      public ApiVersion.Builder setDisplayName(String value)
       Human-meaningful name.
       
      string display_name = 2;
      Parameters:
      value - The displayName to set.
      Returns:
      This builder for chaining.
    • clearDisplayName

      public ApiVersion.Builder clearDisplayName()
       Human-meaningful name.
       
      string display_name = 2;
      Returns:
      This builder for chaining.
    • setDisplayNameBytes

      public ApiVersion.Builder setDisplayNameBytes(com.google.protobuf.ByteString value)
       Human-meaningful name.
       
      string display_name = 2;
      Parameters:
      value - The bytes for displayName to set.
      Returns:
      This builder for chaining.
    • getDescription

      public String getDescription()
       A detailed description.
       
      string description = 3;
      Specified by:
      getDescription in interface ApiVersionOrBuilder
      Returns:
      The description.
    • getDescriptionBytes

      public com.google.protobuf.ByteString getDescriptionBytes()
       A detailed description.
       
      string description = 3;
      Specified by:
      getDescriptionBytes in interface ApiVersionOrBuilder
      Returns:
      The bytes for description.
    • setDescription

      public ApiVersion.Builder setDescription(String value)
       A detailed description.
       
      string description = 3;
      Parameters:
      value - The description to set.
      Returns:
      This builder for chaining.
    • clearDescription

      public ApiVersion.Builder clearDescription()
       A detailed description.
       
      string description = 3;
      Returns:
      This builder for chaining.
    • setDescriptionBytes

      public ApiVersion.Builder setDescriptionBytes(com.google.protobuf.ByteString value)
       A detailed description.
       
      string description = 3;
      Parameters:
      value - The bytes for description to set.
      Returns:
      This builder for chaining.
    • hasCreateTime

      public boolean hasCreateTime()
       Output only. Creation timestamp.
       
      .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasCreateTime in interface ApiVersionOrBuilder
      Returns:
      Whether the createTime field is set.
    • getCreateTime

      public com.google.protobuf.Timestamp getCreateTime()
       Output only. Creation timestamp.
       
      .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTime in interface ApiVersionOrBuilder
      Returns:
      The createTime.
    • setCreateTime

      public ApiVersion.Builder setCreateTime(com.google.protobuf.Timestamp value)
       Output only. Creation timestamp.
       
      .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setCreateTime

      public ApiVersion.Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Output only. Creation timestamp.
       
      .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergeCreateTime

      public ApiVersion.Builder mergeCreateTime(com.google.protobuf.Timestamp value)
       Output only. Creation timestamp.
       
      .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearCreateTime

      public ApiVersion.Builder clearCreateTime()
       Output only. Creation timestamp.
       
      .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreateTimeBuilder

      public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()
       Output only. Creation timestamp.
       
      .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
       Output only. Creation timestamp.
       
      .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTimeOrBuilder in interface ApiVersionOrBuilder
    • hasUpdateTime

      public boolean hasUpdateTime()
       Output only. Last update timestamp.
       
      .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasUpdateTime in interface ApiVersionOrBuilder
      Returns:
      Whether the updateTime field is set.
    • getUpdateTime

      public com.google.protobuf.Timestamp getUpdateTime()
       Output only. Last update timestamp.
       
      .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTime in interface ApiVersionOrBuilder
      Returns:
      The updateTime.
    • setUpdateTime

      public ApiVersion.Builder setUpdateTime(com.google.protobuf.Timestamp value)
       Output only. Last update timestamp.
       
      .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setUpdateTime

      public ApiVersion.Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Output only. Last update timestamp.
       
      .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergeUpdateTime

      public ApiVersion.Builder mergeUpdateTime(com.google.protobuf.Timestamp value)
       Output only. Last update timestamp.
       
      .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearUpdateTime

      public ApiVersion.Builder clearUpdateTime()
       Output only. Last update timestamp.
       
      .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getUpdateTimeBuilder

      public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder()
       Output only. Last update timestamp.
       
      .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getUpdateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
       Output only. Last update timestamp.
       
      .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTimeOrBuilder in interface ApiVersionOrBuilder
    • getState

      public String getState()
       A user-definable description of the lifecycle phase of this API version.
       Format: free-form, but we expect single words that describe API maturity,
       e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION",
       "DEPRECATED", "RETIRED".
       
      string state = 6;
      Specified by:
      getState in interface ApiVersionOrBuilder
      Returns:
      The state.
    • getStateBytes

      public com.google.protobuf.ByteString getStateBytes()
       A user-definable description of the lifecycle phase of this API version.
       Format: free-form, but we expect single words that describe API maturity,
       e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION",
       "DEPRECATED", "RETIRED".
       
      string state = 6;
      Specified by:
      getStateBytes in interface ApiVersionOrBuilder
      Returns:
      The bytes for state.
    • setState

      public ApiVersion.Builder setState(String value)
       A user-definable description of the lifecycle phase of this API version.
       Format: free-form, but we expect single words that describe API maturity,
       e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION",
       "DEPRECATED", "RETIRED".
       
      string state = 6;
      Parameters:
      value - The state to set.
      Returns:
      This builder for chaining.
    • clearState

      public ApiVersion.Builder clearState()
       A user-definable description of the lifecycle phase of this API version.
       Format: free-form, but we expect single words that describe API maturity,
       e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION",
       "DEPRECATED", "RETIRED".
       
      string state = 6;
      Returns:
      This builder for chaining.
    • setStateBytes

      public ApiVersion.Builder setStateBytes(com.google.protobuf.ByteString value)
       A user-definable description of the lifecycle phase of this API version.
       Format: free-form, but we expect single words that describe API maturity,
       e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION",
       "DEPRECATED", "RETIRED".
       
      string state = 6;
      Parameters:
      value - The bytes for state to set.
      Returns:
      This builder for chaining.
    • getLabelsCount

      public int getLabelsCount()
      Description copied from interface: ApiVersionOrBuilder
       Labels attach identifying metadata to resources. Identifying metadata can
       be used to filter list operations.
      
       Label keys and values can be no longer than 64 characters
       (Unicode codepoints), can only contain lowercase letters, numeric
       characters, underscores and dashes. International characters are allowed.
       No more than 64 user labels can be associated with one resource (System
       labels are excluded).
      
       See https://goo.gl/xmQnxf for more information and examples of labels.
       System reserved label keys are prefixed with
       `apigeeregistry.googleapis.com/` and cannot be changed.
       
      map<string, string> labels = 7;
      Specified by:
      getLabelsCount in interface ApiVersionOrBuilder
    • containsLabels

      public boolean containsLabels(String key)
       Labels attach identifying metadata to resources. Identifying metadata can
       be used to filter list operations.
      
       Label keys and values can be no longer than 64 characters
       (Unicode codepoints), can only contain lowercase letters, numeric
       characters, underscores and dashes. International characters are allowed.
       No more than 64 user labels can be associated with one resource (System
       labels are excluded).
      
       See https://goo.gl/xmQnxf for more information and examples of labels.
       System reserved label keys are prefixed with
       `apigeeregistry.googleapis.com/` and cannot be changed.
       
      map<string, string> labels = 7;
      Specified by:
      containsLabels in interface ApiVersionOrBuilder
    • getLabels

      @Deprecated public Map<String,String> getLabels()
      Deprecated.
      Use getLabelsMap() instead.
      Specified by:
      getLabels in interface ApiVersionOrBuilder
    • getLabelsMap

      public Map<String,String> getLabelsMap()
       Labels attach identifying metadata to resources. Identifying metadata can
       be used to filter list operations.
      
       Label keys and values can be no longer than 64 characters
       (Unicode codepoints), can only contain lowercase letters, numeric
       characters, underscores and dashes. International characters are allowed.
       No more than 64 user labels can be associated with one resource (System
       labels are excluded).
      
       See https://goo.gl/xmQnxf for more information and examples of labels.
       System reserved label keys are prefixed with
       `apigeeregistry.googleapis.com/` and cannot be changed.
       
      map<string, string> labels = 7;
      Specified by:
      getLabelsMap in interface ApiVersionOrBuilder
    • getLabelsOrDefault

      public String getLabelsOrDefault(String key, String defaultValue)
       Labels attach identifying metadata to resources. Identifying metadata can
       be used to filter list operations.
      
       Label keys and values can be no longer than 64 characters
       (Unicode codepoints), can only contain lowercase letters, numeric
       characters, underscores and dashes. International characters are allowed.
       No more than 64 user labels can be associated with one resource (System
       labels are excluded).
      
       See https://goo.gl/xmQnxf for more information and examples of labels.
       System reserved label keys are prefixed with
       `apigeeregistry.googleapis.com/` and cannot be changed.
       
      map<string, string> labels = 7;
      Specified by:
      getLabelsOrDefault in interface ApiVersionOrBuilder
    • getLabelsOrThrow

      public String getLabelsOrThrow(String key)
       Labels attach identifying metadata to resources. Identifying metadata can
       be used to filter list operations.
      
       Label keys and values can be no longer than 64 characters
       (Unicode codepoints), can only contain lowercase letters, numeric
       characters, underscores and dashes. International characters are allowed.
       No more than 64 user labels can be associated with one resource (System
       labels are excluded).
      
       See https://goo.gl/xmQnxf for more information and examples of labels.
       System reserved label keys are prefixed with
       `apigeeregistry.googleapis.com/` and cannot be changed.
       
      map<string, string> labels = 7;
      Specified by:
      getLabelsOrThrow in interface ApiVersionOrBuilder
    • clearLabels

      public ApiVersion.Builder clearLabels()
    • removeLabels

      public ApiVersion.Builder removeLabels(String key)
       Labels attach identifying metadata to resources. Identifying metadata can
       be used to filter list operations.
      
       Label keys and values can be no longer than 64 characters
       (Unicode codepoints), can only contain lowercase letters, numeric
       characters, underscores and dashes. International characters are allowed.
       No more than 64 user labels can be associated with one resource (System
       labels are excluded).
      
       See https://goo.gl/xmQnxf for more information and examples of labels.
       System reserved label keys are prefixed with
       `apigeeregistry.googleapis.com/` and cannot be changed.
       
      map<string, string> labels = 7;
    • getMutableLabels

      @Deprecated public Map<String,String> getMutableLabels()
      Deprecated.
      Use alternate mutation accessors instead.
    • putLabels

      public ApiVersion.Builder putLabels(String key, String value)
       Labels attach identifying metadata to resources. Identifying metadata can
       be used to filter list operations.
      
       Label keys and values can be no longer than 64 characters
       (Unicode codepoints), can only contain lowercase letters, numeric
       characters, underscores and dashes. International characters are allowed.
       No more than 64 user labels can be associated with one resource (System
       labels are excluded).
      
       See https://goo.gl/xmQnxf for more information and examples of labels.
       System reserved label keys are prefixed with
       `apigeeregistry.googleapis.com/` and cannot be changed.
       
      map<string, string> labels = 7;
    • putAllLabels

      public ApiVersion.Builder putAllLabels(Map<String,String> values)
       Labels attach identifying metadata to resources. Identifying metadata can
       be used to filter list operations.
      
       Label keys and values can be no longer than 64 characters
       (Unicode codepoints), can only contain lowercase letters, numeric
       characters, underscores and dashes. International characters are allowed.
       No more than 64 user labels can be associated with one resource (System
       labels are excluded).
      
       See https://goo.gl/xmQnxf for more information and examples of labels.
       System reserved label keys are prefixed with
       `apigeeregistry.googleapis.com/` and cannot be changed.
       
      map<string, string> labels = 7;
    • getAnnotationsCount

      public int getAnnotationsCount()
      Description copied from interface: ApiVersionOrBuilder
       Annotations attach non-identifying metadata to resources.
      
       Annotation keys and values are less restricted than those of labels, but
       should be generally used for small values of broad interest. Larger, topic-
       specific metadata should be stored in Artifacts.
       
      map<string, string> annotations = 8;
      Specified by:
      getAnnotationsCount in interface ApiVersionOrBuilder
    • containsAnnotations

      public boolean containsAnnotations(String key)
       Annotations attach non-identifying metadata to resources.
      
       Annotation keys and values are less restricted than those of labels, but
       should be generally used for small values of broad interest. Larger, topic-
       specific metadata should be stored in Artifacts.
       
      map<string, string> annotations = 8;
      Specified by:
      containsAnnotations in interface ApiVersionOrBuilder
    • getAnnotations

      @Deprecated public Map<String,String> getAnnotations()
      Deprecated.
      Use getAnnotationsMap() instead.
      Specified by:
      getAnnotations in interface ApiVersionOrBuilder
    • getAnnotationsMap

      public Map<String,String> getAnnotationsMap()
       Annotations attach non-identifying metadata to resources.
      
       Annotation keys and values are less restricted than those of labels, but
       should be generally used for small values of broad interest. Larger, topic-
       specific metadata should be stored in Artifacts.
       
      map<string, string> annotations = 8;
      Specified by:
      getAnnotationsMap in interface ApiVersionOrBuilder
    • getAnnotationsOrDefault

      public String getAnnotationsOrDefault(String key, String defaultValue)
       Annotations attach non-identifying metadata to resources.
      
       Annotation keys and values are less restricted than those of labels, but
       should be generally used for small values of broad interest. Larger, topic-
       specific metadata should be stored in Artifacts.
       
      map<string, string> annotations = 8;
      Specified by:
      getAnnotationsOrDefault in interface ApiVersionOrBuilder
    • getAnnotationsOrThrow

      public String getAnnotationsOrThrow(String key)
       Annotations attach non-identifying metadata to resources.
      
       Annotation keys and values are less restricted than those of labels, but
       should be generally used for small values of broad interest. Larger, topic-
       specific metadata should be stored in Artifacts.
       
      map<string, string> annotations = 8;
      Specified by:
      getAnnotationsOrThrow in interface ApiVersionOrBuilder
    • clearAnnotations

      public ApiVersion.Builder clearAnnotations()
    • removeAnnotations

      public ApiVersion.Builder removeAnnotations(String key)
       Annotations attach non-identifying metadata to resources.
      
       Annotation keys and values are less restricted than those of labels, but
       should be generally used for small values of broad interest. Larger, topic-
       specific metadata should be stored in Artifacts.
       
      map<string, string> annotations = 8;
    • getMutableAnnotations

      @Deprecated public Map<String,String> getMutableAnnotations()
      Deprecated.
      Use alternate mutation accessors instead.
    • putAnnotations

      public ApiVersion.Builder putAnnotations(String key, String value)
       Annotations attach non-identifying metadata to resources.
      
       Annotation keys and values are less restricted than those of labels, but
       should be generally used for small values of broad interest. Larger, topic-
       specific metadata should be stored in Artifacts.
       
      map<string, string> annotations = 8;
    • putAllAnnotations

      public ApiVersion.Builder putAllAnnotations(Map<String,String> values)
       Annotations attach non-identifying metadata to resources.
      
       Annotation keys and values are less restricted than those of labels, but
       should be generally used for small values of broad interest. Larger, topic-
       specific metadata should be stored in Artifacts.
       
      map<string, string> annotations = 8;