Class ApiOperation

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.apihub.v1.ApiOperation
All Implemented Interfaces:
ApiOperationOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class ApiOperation extends com.google.protobuf.GeneratedMessage implements ApiOperationOrBuilder
 Represents an operation contained in an API version in the API Hub.
 An operation is added/updated/deleted in an API version when a new spec is
 added or an existing spec is updated/deleted in a version.
 Currently, an operation will be created only corresponding to OpenAPI spec as
 parsing is supported for OpenAPI spec.
 Alternatively operations can be managed via create,update and delete APIs,
 creation of apiOperation can be possible only for version with no parsed
 operations and update/delete can be possible only for operations created via
 create API.
 
Protobuf type google.cloud.apihub.v1.ApiOperation
See Also:
  • Field Details

  • 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
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getName

      public String getName()
       Identifier. The name of the operation.
      
       Format:
       `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getName in interface ApiOperationOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Identifier. The name of the operation.
      
       Format:
       `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getNameBytes in interface ApiOperationOrBuilder
      Returns:
      The bytes for name.
    • getSpec

      public String getSpec()
       Output only. The name of the spec will be of the format:
       `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`
       Note:The name of the spec will be empty if the operation is created via
       [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation] API.
       
      string spec = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
      Specified by:
      getSpec in interface ApiOperationOrBuilder
      Returns:
      The spec.
    • getSpecBytes

      public com.google.protobuf.ByteString getSpecBytes()
       Output only. The name of the spec will be of the format:
       `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`
       Note:The name of the spec will be empty if the operation is created via
       [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation] API.
       
      string spec = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
      Specified by:
      getSpecBytes in interface ApiOperationOrBuilder
      Returns:
      The bytes for spec.
    • hasDetails

      public boolean hasDetails()
       Optional. Operation details.
       Note: Even though this field is optional, it is required for
       [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation]
       API and we will fail the request if not provided.
       
      .google.cloud.apihub.v1.OperationDetails details = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasDetails in interface ApiOperationOrBuilder
      Returns:
      Whether the details field is set.
    • getDetails

      public OperationDetails getDetails()
       Optional. Operation details.
       Note: Even though this field is optional, it is required for
       [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation]
       API and we will fail the request if not provided.
       
      .google.cloud.apihub.v1.OperationDetails details = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDetails in interface ApiOperationOrBuilder
      Returns:
      The details.
    • getDetailsOrBuilder

      public OperationDetailsOrBuilder getDetailsOrBuilder()
       Optional. Operation details.
       Note: Even though this field is optional, it is required for
       [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation]
       API and we will fail the request if not provided.
       
      .google.cloud.apihub.v1.OperationDetails details = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDetailsOrBuilder in interface ApiOperationOrBuilder
    • hasCreateTime

      public boolean hasCreateTime()
       Output only. The time at which the operation was created.
       
      .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasCreateTime in interface ApiOperationOrBuilder
      Returns:
      Whether the createTime field is set.
    • getCreateTime

      public com.google.protobuf.Timestamp getCreateTime()
       Output only. The time at which the operation was created.
       
      .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTime in interface ApiOperationOrBuilder
      Returns:
      The createTime.
    • getCreateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
       Output only. The time at which the operation was created.
       
      .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTimeOrBuilder in interface ApiOperationOrBuilder
    • hasUpdateTime

      public boolean hasUpdateTime()
       Output only. The time at which the operation was last updated.
       
      .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasUpdateTime in interface ApiOperationOrBuilder
      Returns:
      Whether the updateTime field is set.
    • getUpdateTime

      public com.google.protobuf.Timestamp getUpdateTime()
       Output only. The time at which the operation was last updated.
       
      .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTime in interface ApiOperationOrBuilder
      Returns:
      The updateTime.
    • getUpdateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
       Output only. The time at which the operation was last updated.
       
      .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTimeOrBuilder in interface ApiOperationOrBuilder
    • getAttributesCount

      public int getAttributesCount()
      Description copied from interface: ApiOperationOrBuilder
       Optional. The list of user defined attributes associated with the API
       operation resource. The key is the attribute name. It will be of the
       format: `projects/{project}/locations/{location}/attributes/{attribute}`.
       The value is the attribute values associated with the resource.
       
      map<string, .google.cloud.apihub.v1.AttributeValues> attributes = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAttributesCount in interface ApiOperationOrBuilder
    • containsAttributes

      public boolean containsAttributes(String key)
       Optional. The list of user defined attributes associated with the API
       operation resource. The key is the attribute name. It will be of the
       format: `projects/{project}/locations/{location}/attributes/{attribute}`.
       The value is the attribute values associated with the resource.
       
      map<string, .google.cloud.apihub.v1.AttributeValues> attributes = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      containsAttributes in interface ApiOperationOrBuilder
    • getAttributes

      @Deprecated public Map<String,AttributeValues> getAttributes()
      Deprecated.
      Use getAttributesMap() instead.
      Specified by:
      getAttributes in interface ApiOperationOrBuilder
    • getAttributesMap

      public Map<String,AttributeValues> getAttributesMap()
       Optional. The list of user defined attributes associated with the API
       operation resource. The key is the attribute name. It will be of the
       format: `projects/{project}/locations/{location}/attributes/{attribute}`.
       The value is the attribute values associated with the resource.
       
      map<string, .google.cloud.apihub.v1.AttributeValues> attributes = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAttributesMap in interface ApiOperationOrBuilder
    • getAttributesOrDefault

      public AttributeValues getAttributesOrDefault(String key, AttributeValues defaultValue)
       Optional. The list of user defined attributes associated with the API
       operation resource. The key is the attribute name. It will be of the
       format: `projects/{project}/locations/{location}/attributes/{attribute}`.
       The value is the attribute values associated with the resource.
       
      map<string, .google.cloud.apihub.v1.AttributeValues> attributes = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAttributesOrDefault in interface ApiOperationOrBuilder
    • getAttributesOrThrow

      public AttributeValues getAttributesOrThrow(String key)
       Optional. The list of user defined attributes associated with the API
       operation resource. The key is the attribute name. It will be of the
       format: `projects/{project}/locations/{location}/attributes/{attribute}`.
       The value is the attribute values associated with the resource.
       
      map<string, .google.cloud.apihub.v1.AttributeValues> attributes = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAttributesOrThrow in interface ApiOperationOrBuilder
    • getSourceMetadataList

      public List<SourceMetadata> getSourceMetadataList()
       Output only. The list of sources and metadata from the sources of the API
       operation.
       
      repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getSourceMetadataList in interface ApiOperationOrBuilder
    • getSourceMetadataOrBuilderList

      public List<? extends SourceMetadataOrBuilder> getSourceMetadataOrBuilderList()
       Output only. The list of sources and metadata from the sources of the API
       operation.
       
      repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getSourceMetadataOrBuilderList in interface ApiOperationOrBuilder
    • getSourceMetadataCount

      public int getSourceMetadataCount()
       Output only. The list of sources and metadata from the sources of the API
       operation.
       
      repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getSourceMetadataCount in interface ApiOperationOrBuilder
    • getSourceMetadata

      public SourceMetadata getSourceMetadata(int index)
       Output only. The list of sources and metadata from the sources of the API
       operation.
       
      repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getSourceMetadata in interface ApiOperationOrBuilder
    • getSourceMetadataOrBuilder

      public SourceMetadataOrBuilder getSourceMetadataOrBuilder(int index)
       Output only. The list of sources and metadata from the sources of the API
       operation.
       
      repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getSourceMetadataOrBuilder in interface ApiOperationOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static ApiOperation parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ApiOperation parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ApiOperation parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ApiOperation parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ApiOperation parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ApiOperation parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ApiOperation parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ApiOperation parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static ApiOperation parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static ApiOperation parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ApiOperation parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ApiOperation parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public ApiOperation.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static ApiOperation.Builder newBuilder()
    • newBuilder

      public static ApiOperation.Builder newBuilder(ApiOperation prototype)
    • toBuilder

      public ApiOperation.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected ApiOperation.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static ApiOperation getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<ApiOperation> parser()
    • getParserForType

      public com.google.protobuf.Parser<ApiOperation> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public ApiOperation getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder