Class: Google::Apis::ComputeBeta::SecurityPolicyUserDefinedField

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SecurityPolicyUserDefinedField

Returns a new instance of SecurityPolicyUserDefinedField.



61341
61342
61343
# File 'lib/google/apis/compute_beta/classes.rb', line 61341

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

Instance Attribute Details

#baseString

The base relative to which 'offset' is measured. Possible values are:

  • IPV4: Points to the beginning of the IPv4 header.
  • IPV6: Points to the beginning of the IPv6 header.
  • TCP: Points to the beginning of the TCP header, skipping over any IPv4 options or IPv6 extension headers. Not present for non-first fragments.
  • UDP: Points to the beginning of the UDP header, skipping over any IPv4 options or IPv6 extension headers. Not present for non-first fragments. required Corresponds to the JSON property base

Returns:

  • (String)


61315
61316
61317
# File 'lib/google/apis/compute_beta/classes.rb', line 61315

def base
  @base
end

#maskString

If specified, apply this mask (bitwise AND) to the field to ignore bits before matching. Encoded as a hexadecimal number (starting with "0x"). The last byte of the field (in network byte order) corresponds to the least significant byte of the mask. Corresponds to the JSON property mask

Returns:

  • (String)


61323
61324
61325
# File 'lib/google/apis/compute_beta/classes.rb', line 61323

def mask
  @mask
end

#nameString

The name of this field. Must be unique within the policy. Corresponds to the JSON property name

Returns:

  • (String)


61328
61329
61330
# File 'lib/google/apis/compute_beta/classes.rb', line 61328

def name
  @name
end

#offsetFixnum

Offset of the first byte of the field (in network byte order) relative to 'base'. Corresponds to the JSON property offset

Returns:

  • (Fixnum)


61334
61335
61336
# File 'lib/google/apis/compute_beta/classes.rb', line 61334

def offset
  @offset
end

#sizeFixnum

Size of the field in bytes. Valid values: 1-4. Corresponds to the JSON property size

Returns:

  • (Fixnum)


61339
61340
61341
# File 'lib/google/apis/compute_beta/classes.rb', line 61339

def size
  @size
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



61346
61347
61348
61349
61350
61351
61352
# File 'lib/google/apis/compute_beta/classes.rb', line 61346

def update!(**args)
  @base = args[:base] if args.key?(:base)
  @mask = args[:mask] if args.key?(:mask)
  @name = args[:name] if args.key?(:name)
  @offset = args[:offset] if args.key?(:offset)
  @size = args[:size] if args.key?(:size)
end