Class: Google::Apis::ApihubV1::GoogleCloudApihubV1ApiOperation

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/apihub_v1/classes.rb,
lib/google/apis/apihub_v1/representations.rb,
lib/google/apis/apihub_v1/representations.rb

Overview

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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudApihubV1ApiOperation

Returns a new instance of GoogleCloudApihubV1ApiOperation.



728
729
730
# File 'lib/google/apis/apihub_v1/classes.rb', line 728

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#attributesHash<String,Google::Apis::ApihubV1::GoogleCloudApihubV1AttributeValues>

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. Corresponds to the JSON propertyattributes`



691
692
693
# File 'lib/google/apis/apihub_v1/classes.rb', line 691

def attributes
  @attributes
end

#create_timeString

Output only. The time at which the operation was created. Corresponds to the JSON property createTime

Returns:

  • (String)


696
697
698
# File 'lib/google/apis/apihub_v1/classes.rb', line 696

def create_time
  @create_time
end

#detailsGoogle::Apis::ApihubV1::GoogleCloudApihubV1OperationDetails

The operation details parsed from the spec. Corresponds to the JSON property details



701
702
703
# File 'lib/google/apis/apihub_v1/classes.rb', line 701

def details
  @details
end

#nameString

Identifier. The name of the operation. Format: projects/project/locations/ location/apis/api/versions/version/operations/operation` Corresponds to the JSON propertyname`

Returns:

  • (String)


707
708
709
# File 'lib/google/apis/apihub_v1/classes.rb', line 707

def name
  @name
end

#source_metadataArray<Google::Apis::ApihubV1::GoogleCloudApihubV1SourceMetadata>

Output only. The list of sources and metadata from the sources of the API operation. Corresponds to the JSON property sourceMetadata



713
714
715
# File 'lib/google/apis/apihub_v1/classes.rb', line 713

def 
  @source_metadata
end

#specString

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 API. Corresponds to the JSON propertyspec`

Returns:

  • (String)


721
722
723
# File 'lib/google/apis/apihub_v1/classes.rb', line 721

def spec
  @spec
end

#update_timeString

Output only. The time at which the operation was last updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


726
727
728
# File 'lib/google/apis/apihub_v1/classes.rb', line 726

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



733
734
735
736
737
738
739
740
741
# File 'lib/google/apis/apihub_v1/classes.rb', line 733

def update!(**args)
  @attributes = args[:attributes] if args.key?(:attributes)
  @create_time = args[:create_time] if args.key?(:create_time)
  @details = args[:details] if args.key?(:details)
  @name = args[:name] if args.key?(:name)
  @source_metadata = args[:source_metadata] if args.key?(:source_metadata)
  @spec = args[:spec] if args.key?(:spec)
  @update_time = args[:update_time] if args.key?(:update_time)
end