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 ( https://en.wikipedia.org/wiki/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.
341 342 343 |
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 341 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
249 250 251 |
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 249 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.
256 257 258 |
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 256 def contents @contents end |
#create_time ⇒ String
Output only. Creation timestamp; when the spec resource was created.
Corresponds to the JSON property createTime
261 262 263 |
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 261 def create_time @create_time end |
#description ⇒ String
A detailed description.
Corresponds to the JSON property description
266 267 268 |
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 266 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
271 272 273 |
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 271 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
277 278 279 |
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 277 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
289 290 291 |
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 289 def labels @labels end |
#mime_type ⇒ String
A style (format) descriptor for this spec that is specified as a Media Type (
https://en.wikipedia.org/wiki/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
301 302 303 |
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 301 def mime_type @mime_type end |
#name ⇒ String
Resource name.
Corresponds to the JSON property name
306 307 308 |
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 306 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
312 313 314 |
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 312 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
319 320 321 |
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 319 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
325 326 327 |
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 325 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
331 332 333 |
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 331 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
339 340 341 |
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 339 def source_uri @source_uri end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 |
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 346 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 |