# Service Management V1 API - Class Google::Api::MethodPolicy (v1.8.0)

1.8.0 (latest) 1.7.1 1.6.0 1.5.1 1.4.0 1.3.0 1.2.1 1.1.0 1.0.2 0.11.0 0.10.2 0.9.0 0.8.0 0.7.0 0.6.1 0.5.0 0.4.1 0.3.10 Reference documentation and code samples for the Service Management V1 API class Google::Api::MethodPolicy.

Defines policies applying to an RPC method.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #request_policies

    def request_policies() -> ::Array<::Google::Api::FieldPolicy>

**Returns**

- (::Array\<[::Google::Api::FieldPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-FieldPolicy)\>) --- Policies that are applicable to the request message.

### #request_policies=

    def request_policies=(value) -> ::Array<::Google::Api::FieldPolicy>

**Parameter**

- **value** (::Array\<[::Google::Api::FieldPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-FieldPolicy)\>) --- Policies that are applicable to the request message.
**Returns**

- (::Array\<[::Google::Api::FieldPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-FieldPolicy)\>) --- Policies that are applicable to the request message.

### #selector

    def selector() -> ::String

**Returns**

- (::String) --- Selects a method to which these policies should be enforced, for example, "google.pubsub.v1.Subscriber.CreateSubscription".

  Refer to [selector](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-DocumentationRule#Google__Api__DocumentationRule_selector_instance_ "Google::Api::DocumentationRule#selector (method)") for syntax
  details.

  NOTE: This field must not be set in the proto annotation. It will be
  automatically filled by the service config compiler .

### #selector=

    def selector=(value) -> ::String

**Parameter**

- **value** (::String) --- Selects a method to which these policies should be enforced, for example, "google.pubsub.v1.Subscriber.CreateSubscription".


  Refer to [selector](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-DocumentationRule#Google__Api__DocumentationRule_selector_instance_ "Google::Api::DocumentationRule#selector (method)") for syntax
  details.

  NOTE: This field must not be set in the proto annotation. It will be
  automatically filled by the service config compiler .
**Returns**

- (::String) --- Selects a method to which these policies should be enforced, for example, "google.pubsub.v1.Subscriber.CreateSubscription".

  Refer to [selector](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-DocumentationRule#Google__Api__DocumentationRule_selector_instance_ "Google::Api::DocumentationRule#selector (method)") for syntax
  details.

  NOTE: This field must not be set in the proto annotation. It will be
  automatically filled by the service config compiler .