Class: Google::Apis::ApihubV1::GoogleCloudApihubV1Definition
- Inherits:
-
Object
- Object
- Google::Apis::ApihubV1::GoogleCloudApihubV1Definition
- 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 a definition for example schema, request, response definitions
contained in an API version. A definition 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, definition will be created only corresponding to OpenAPI
spec as parsing is supported for OpenAPI spec. Also, within OpenAPI spec, only
schema object is supported.
Instance Attribute Summary collapse
-
#attributes ⇒ Hash<String,Google::Apis::ApihubV1::GoogleCloudApihubV1AttributeValues>
Optional.
-
#create_time ⇒ String
Output only.
-
#name ⇒ String
Identifier.
-
#schema ⇒ Google::Apis::ApihubV1::GoogleCloudApihubV1Schema
The schema details derived from the spec.
-
#spec ⇒ String
Output only.
-
#type ⇒ String
Output only.
-
#update_time ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudApihubV1Definition
constructor
A new instance of GoogleCloudApihubV1Definition.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudApihubV1Definition
Returns a new instance of GoogleCloudApihubV1Definition.
1530 1531 1532 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 1530 def initialize(**args) update!(**args) end |
Instance Attribute Details
#attributes ⇒ Hash<String,Google::Apis::ApihubV1::GoogleCloudApihubV1AttributeValues>
Optional. The list of user defined attributes associated with the definition
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`
1492 1493 1494 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 1492 def attributes @attributes end |
#create_time ⇒ String
Output only. The time at which the definition was created.
Corresponds to the JSON property createTime
1497 1498 1499 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 1497 def create_time @create_time end |
#name ⇒ String
Identifier. The name of the definition. Format: projects/project/locations/
location/apis/api/versions/version/definitions/definition`
Corresponds to the JSON propertyname`
1503 1504 1505 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 1503 def name @name end |
#schema ⇒ Google::Apis::ApihubV1::GoogleCloudApihubV1Schema
The schema details derived from the spec. Currently, this entity is supported
for OpenAPI spec only. For OpenAPI spec, this maps to the schema defined in
the definitions section for OpenAPI 2.0 version and in components.schemas
section for OpenAPI 3.0 and 3.1 version.
Corresponds to the JSON property schema
1511 1512 1513 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 1511 def schema @schema end |
#spec ⇒ String
Output only. The name of the spec from where the definition was parsed. Format
is projects/project/locations/location/apis/api/versions/version/
specs/spec`
Corresponds to the JSON propertyspec`
1518 1519 1520 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 1518 def spec @spec end |
#type ⇒ String
Output only. The type of the definition.
Corresponds to the JSON property type
1523 1524 1525 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 1523 def type @type end |
#update_time ⇒ String
Output only. The time at which the definition was last updated.
Corresponds to the JSON property updateTime
1528 1529 1530 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 1528 def update_time @update_time end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1535 1536 1537 1538 1539 1540 1541 1542 1543 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 1535 def update!(**args) @attributes = args[:attributes] if args.key?(:attributes) @create_time = args[:create_time] if args.key?(:create_time) @name = args[:name] if args.key?(:name) @schema = args[:schema] if args.key?(:schema) @spec = args[:spec] if args.key?(:spec) @type = args[:type] if args.key?(:type) @update_time = args[:update_time] if args.key?(:update_time) end |