Class: Google::Apis::ServicemanagementV1::ContextRule

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

Overview

A context rule provides information about the context for an individual API element.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ContextRule

Returns a new instance of ContextRule.



1016
1017
1018
# File 'lib/google/apis/servicemanagement_v1/classes.rb', line 1016

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

Instance Attribute Details

#allowed_request_extensionsArray<String>

A list of full type names or extension IDs of extensions allowed in grpc side channel from client to backend. Corresponds to the JSON property allowedRequestExtensions

Returns:

  • (Array<String>)


990
991
992
# File 'lib/google/apis/servicemanagement_v1/classes.rb', line 990

def allowed_request_extensions
  @allowed_request_extensions
end

#allowed_response_extensionsArray<String>

A list of full type names or extension IDs of extensions allowed in grpc side channel from backend to client. Corresponds to the JSON property allowedResponseExtensions

Returns:

  • (Array<String>)


996
997
998
# File 'lib/google/apis/servicemanagement_v1/classes.rb', line 996

def allowed_response_extensions
  @allowed_response_extensions
end

#providedArray<String>

A list of full type names of provided contexts. It is used to support propagating HTTP headers and ETags from the response extension. Corresponds to the JSON property provided

Returns:

  • (Array<String>)


1002
1003
1004
# File 'lib/google/apis/servicemanagement_v1/classes.rb', line 1002

def provided
  @provided
end

#requestedArray<String>

A list of full type names of requested contexts, only the requested context will be made available to the backend. Corresponds to the JSON property requested

Returns:

  • (Array<String>)


1008
1009
1010
# File 'lib/google/apis/servicemanagement_v1/classes.rb', line 1008

def requested
  @requested
end

#selectorString

Selects the methods to which this rule applies. Refer to selector for syntax details. Corresponds to the JSON property selector

Returns:

  • (String)


1014
1015
1016
# File 'lib/google/apis/servicemanagement_v1/classes.rb', line 1014

def selector
  @selector
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1021
1022
1023
1024
1025
1026
1027
# File 'lib/google/apis/servicemanagement_v1/classes.rb', line 1021

def update!(**args)
  @allowed_request_extensions = args[:allowed_request_extensions] if args.key?(:allowed_request_extensions)
  @allowed_response_extensions = args[:allowed_response_extensions] if args.key?(:allowed_response_extensions)
  @provided = args[:provided] if args.key?(:provided)
  @requested = args[:requested] if args.key?(:requested)
  @selector = args[:selector] if args.key?(:selector)
end