Class: Google::Apis::ServicecontrolV2::Api

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

Overview

This message defines attributes associated with API operations, such as a network API request. The terminology is based on the conventions used by Google APIs, Istio, and OpenAPI.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Api

Returns a new instance of Api.



57
58
59
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 57

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

Instance Attribute Details

#operationString

The API operation name. For gRPC requests, it is the fully qualified API method name, such as "google.pubsub.v1.Publisher.Publish". For OpenAPI requests, it is the operationId, such as "getPet". Corresponds to the JSON property operation

Returns:

  • (String)


36
37
38
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 36

def operation
  @operation
end

#protocolString

The API protocol used for sending the request, such as "http", "https", "grpc", or "internal". Corresponds to the JSON property protocol

Returns:

  • (String)


42
43
44
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 42

def protocol
  @protocol
end

#serviceString

The API service name. It is a logical identifier for a networked API, such as " pubsub.googleapis.com". The naming syntax depends on the API management system being used for handling the request. Corresponds to the JSON property service

Returns:

  • (String)


49
50
51
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 49

def service
  @service
end

#versionString

The API version associated with the API operation above, such as "v1" or " v1alpha1". Corresponds to the JSON property version

Returns:

  • (String)


55
56
57
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 55

def version
  @version
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



62
63
64
65
66
67
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 62

def update!(**args)
  @operation = args[:operation] if args.key?(:operation)
  @protocol = args[:protocol] if args.key?(:protocol)
  @service = args[:service] if args.key?(:service)
  @version = args[:version] if args.key?(:version)
end