Class: Google::Apis::ServicedirectoryV1::Service
- Inherits:
-
Object
- Object
- Google::Apis::ServicedirectoryV1::Service
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/servicedirectory_v1/classes.rb,
generated/google/apis/servicedirectory_v1/representations.rb,
generated/google/apis/servicedirectory_v1/representations.rb
Overview
An individual service. A service contains a name and optional metadata. A service must exist before endpoints can be added to it.
Instance Attribute Summary collapse
-
#annotations ⇒ Hash<String,String>
Optional.
-
#endpoints ⇒ Array<Google::Apis::ServicedirectoryV1::Endpoint>
Output only.
-
#name ⇒ String
Immutable.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Service
constructor
A new instance of Service.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Service
Returns a new instance of Service.
623 624 625 |
# File 'generated/google/apis/servicedirectory_v1/classes.rb', line 623 def initialize(**args) update!(**args) end |
Instance Attribute Details
#annotations ⇒ Hash<String,String>
Optional. Annotations for the service. This data can be consumed by service
clients. Restrictions: - The entire annotations dictionary may contain up to
2000 characters, spread accoss all key-value pairs. Annotations that goes
beyond any these limits will be rejected. - Valid annotation keys have two
segments: an optional prefix and name, separated by a slash (/). The name
segment is required and must be 63 characters or less, beginning and ending
with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_),
dots (.), and alphanumerics between. The prefix is optional. If specified, the
prefix must be a DNS subdomain: a series of DNS labels separated by dots (.),
not longer than 253 characters in total, followed by a slash (/). Annotations
that fails to meet these requirements will be rejected. - The '(.)google.com/'
and '(.)googleapis.com/' prefixes are reserved for system annotations
managed by Service Directory. If the user tries to write to these keyspaces,
those entries will be silently ignored by the system. Note: This field is
equivalent to the 'metadata' field in the v1beta1 API. They have the same
syntax and read/write to the same location in Service Directory.
Corresponds to the JSON property annotations
609 610 611 |
# File 'generated/google/apis/servicedirectory_v1/classes.rb', line 609 def annotations @annotations end |
#endpoints ⇒ Array<Google::Apis::ServicedirectoryV1::Endpoint>
Output only. Endpoints associated with this service. Returned on LookupService.
Resolve. Control plane clients should use RegistrationService.ListEndpoints.
Corresponds to the JSON property endpoints
615 616 617 |
# File 'generated/google/apis/servicedirectory_v1/classes.rb', line 615 def endpoints @endpoints end |
#name ⇒ String
Immutable. The resource name for the service in the format 'projects//
locations//namespaces//services/'.
Corresponds to the JSON property name
621 622 623 |
# File 'generated/google/apis/servicedirectory_v1/classes.rb', line 621 def name @name end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
628 629 630 631 632 |
# File 'generated/google/apis/servicedirectory_v1/classes.rb', line 628 def update!(**args) @annotations = args[:annotations] if args.key?(:annotations) @endpoints = args[:endpoints] if args.key?(:endpoints) @name = args[:name] if args.key?(:name) end |