Class: Google::Apis::ApigeeregistryV1::ApiSpec
- Inherits:
-
Object
- Object
- Google::Apis::ApigeeregistryV1::ApiSpec
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/apigeeregistry_v1/classes.rb,
lib/google/apis/apigeeregistry_v1/representations.rb,
lib/google/apis/apigeeregistry_v1/representations.rb
Overview
Describes a version of an API in a structured way. ApiSpecs provide formal descriptions that consumers can use to use a version. ApiSpec resources are intended to be fully-resolved descriptions of an ApiVersion. When specs consist of multiple files, these should be bundled together (e.g., in a zip archive) and stored as a unit. Multiple specs can exist to provide representations in different API description formats. Synchronization of these representations would be provided by tooling and background services.
Instance Attribute Summary collapse
-
#annotations ⇒ Hash<String,String>
Annotations attach non-identifying metadata to resources.
-
#contents ⇒ String
Input only.
-
#create_time ⇒ String
Output only.
-
#description ⇒ String
A detailed description.
-
#filename ⇒ String
A possibly-hierarchical name used to refer to the spec from other specs.
-
#hash_prop ⇒ String
Output only.
-
#labels ⇒ Hash<String,String>
Labels attach identifying metadata to resources.
-
#mime_type ⇒ String
A style (format) descriptor for this spec that is specified as a Media Type.
-
#name ⇒ String
Resource name.
-
#revision_create_time ⇒ String
Output only.
-
#revision_id ⇒ String
Output only.
-
#revision_update_time ⇒ String
Output only.
-
#size_bytes ⇒ Fixnum
Output only.
-
#source_uri ⇒ String
The original source URI of the spec (if one exists).
Instance Method Summary collapse
-
#initialize(**args) ⇒ ApiSpec
constructor
A new instance of ApiSpec.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ApiSpec
Returns a new instance of ApiSpec.
342 343 344 |
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 342 def initialize(**args) update!(**args) end |
Instance Attribute Details
#annotations ⇒ Hash<String,String>
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.
Corresponds to the JSON property annotations
250 251 252 |
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 250 def annotations @annotations end |
#contents ⇒ String
Input only. The contents of the spec. Provided by API callers when specs are
created or updated. To access the contents of a spec, use GetApiSpecContents.
Corresponds to the JSON property contents
NOTE: Values are automatically base64 encoded/decoded in the client library.
257 258 259 |
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 257 def contents @contents end |
#create_time ⇒ String
Output only. Creation timestamp; when the spec resource was created.
Corresponds to the JSON property createTime
262 263 264 |
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 262 def create_time @create_time end |
#description ⇒ String
A detailed description.
Corresponds to the JSON property description
267 268 269 |
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 267 def description @description end |
#filename ⇒ String
A possibly-hierarchical name used to refer to the spec from other specs.
Corresponds to the JSON property filename
272 273 274 |
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 272 def filename @filename end |
#hash_prop ⇒ String
Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped,
this is the hash of the uncompressed spec.
Corresponds to the JSON property hash
278 279 280 |
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 278 def hash_prop @hash_prop end |
#labels ⇒ Hash<String,String>
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.
Corresponds to the JSON property labels
290 291 292 |
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 290 def labels @labels end |
#mime_type ⇒ String
A style (format) descriptor for this spec that is specified as a Media Type. Possible values include
application/vnd.apigee.proto
, application/vnd.apigee.openapi
, and
application/vnd.apigee.graphql
, with possible suffixes representing
compression types. These hypothetical names are defined in the vendor tree
defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final.
Content types can specify compression. Currently only GZip compression is
supported (indicated with "+gzip").
Corresponds to the JSON property mimeType
302 303 304 |
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 302 def mime_type @mime_type end |
#name ⇒ String
Resource name.
Corresponds to the JSON property name
307 308 309 |
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 307 def name @name end |
#revision_create_time ⇒ String
Output only. Revision creation timestamp; when the represented revision was
created.
Corresponds to the JSON property revisionCreateTime
313 314 315 |
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 313 def revision_create_time @revision_create_time end |
#revision_id ⇒ String
Output only. Immutable. The revision ID of the spec. A new revision is
committed whenever the spec contents are changed. The format is an 8-character
hexadecimal string.
Corresponds to the JSON property revisionId
320 321 322 |
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 320 def revision_id @revision_id end |
#revision_update_time ⇒ String
Output only. Last update timestamp: when the represented revision was last
modified.
Corresponds to the JSON property revisionUpdateTime
326 327 328 |
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 326 def revision_update_time @revision_update_time end |
#size_bytes ⇒ Fixnum
Output only. The size of the spec file in bytes. If the spec is gzipped, this
is the size of the uncompressed spec.
Corresponds to the JSON property sizeBytes
332 333 334 |
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 332 def size_bytes @size_bytes end |
#source_uri ⇒ String
The original source URI of the spec (if one exists). This is an external
location that can be used for reference purposes but which may not be
authoritative since this external resource may change after the spec is
retrieved.
Corresponds to the JSON property sourceUri
340 341 342 |
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 340 def source_uri @source_uri end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 |
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 347 def update!(**args) @annotations = args[:annotations] if args.key?(:annotations) @contents = args[:contents] if args.key?(:contents) @create_time = args[:create_time] if args.key?(:create_time) @description = args[:description] if args.key?(:description) @filename = args[:filename] if args.key?(:filename) @hash_prop = args[:hash_prop] if args.key?(:hash_prop) @labels = args[:labels] if args.key?(:labels) @mime_type = args[:mime_type] if args.key?(:mime_type) @name = args[:name] if args.key?(:name) @revision_create_time = args[:revision_create_time] if args.key?(:revision_create_time) @revision_id = args[:revision_id] if args.key?(:revision_id) @revision_update_time = args[:revision_update_time] if args.key?(:revision_update_time) @size_bytes = args[:size_bytes] if args.key?(:size_bytes) @source_uri = args[:source_uri] if args.key?(:source_uri) end |