Class: Google::Apis::ComputeV1::RoutePolicy

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ RoutePolicy

Returns a new instance of RoutePolicy.



45316
45317
45318
# File 'lib/google/apis/compute_v1/classes.rb', line 45316

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

Instance Attribute Details

#descriptionString

An optional description of route policy. Corresponds to the JSON property description

Returns:

  • (String)


45283
45284
45285
# File 'lib/google/apis/compute_v1/classes.rb', line 45283

def description
  @description
end

#fingerprintString

A fingerprint for the Route Policy being applied to this Router, which is essentially a hash of the Route Policy used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update Route Policy. You must always provide an up-to-date fingerprint hash in order to update or change labels. To see the latest fingerprint, make a getRoutePolicy() request to retrieve a Route Policy. Corresponds to the JSON property fingerprint NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


45296
45297
45298
# File 'lib/google/apis/compute_v1/classes.rb', line 45296

def fingerprint
  @fingerprint
end

#nameString

Route Policy name, which must be a resource ID segment and unique within all the router's Route Policies. Name should conform to RFC1035. Corresponds to the JSON property name

Returns:

  • (String)


45302
45303
45304
# File 'lib/google/apis/compute_v1/classes.rb', line 45302

def name
  @name
end

#termsArray<Google::Apis::ComputeV1::RoutePolicyPolicyTerm>

List of terms (the order in the list is not important, they are evaluated in order of priority). Order of policies is not retained and might change when getting policy later. Corresponds to the JSON property terms



45309
45310
45311
# File 'lib/google/apis/compute_v1/classes.rb', line 45309

def terms
  @terms
end

#typeString

Corresponds to the JSON property type

Returns:

  • (String)


45314
45315
45316
# File 'lib/google/apis/compute_v1/classes.rb', line 45314

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



45321
45322
45323
45324
45325
45326
45327
# File 'lib/google/apis/compute_v1/classes.rb', line 45321

def update!(**args)
  @description = args[:description] if args.key?(:description)
  @fingerprint = args[:fingerprint] if args.key?(:fingerprint)
  @name = args[:name] if args.key?(:name)
  @terms = args[:terms] if args.key?(:terms)
  @type = args[:type] if args.key?(:type)
end