class Google::Apis::ServiceconsumermanagementV1::Field

A single field of a message type.

Attributes

cardinality[RW]

The field cardinality. Corresponds to the JSON property `cardinality` @return [String]

default_value[RW]

The string value of the default value of this field. Proto2 syntax only. Corresponds to the JSON property `defaultValue` @return [String]

json_name[RW]

The field JSON name. Corresponds to the JSON property `jsonName` @return [String]

kind[RW]

The field type. Corresponds to the JSON property `kind` @return [String]

name[RW]

The field name. Corresponds to the JSON property `name` @return [String]

number[RW]

The field number. Corresponds to the JSON property `number` @return [Fixnum]

oneof_index[RW]

The index of the field type in `Type.oneofs`, for message or enumeration types. The first type has index 1; zero means the type is not in the list. Corresponds to the JSON property `oneofIndex` @return [Fixnum]

options[RW]

The protocol buffer options. Corresponds to the JSON property `options` @return [Array<Google::Apis::ServiceconsumermanagementV1::Option>]

packed[RW]

Whether to use alternative packed wire representation. Corresponds to the JSON property `packed` @return [Boolean]

packed?[RW]

Whether to use alternative packed wire representation. Corresponds to the JSON property `packed` @return [Boolean]

type_url[RW]

The field type URL, without the scheme, for message or enumeration types. Example: `“type.googleapis.com/google.protobuf.Timestamp”`. Corresponds to the JSON property `typeUrl` @return [String]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/serviceconsumermanagement_v1/classes.rb, line 1141
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/serviceconsumermanagement_v1/classes.rb, line 1146
def update!(**args)
  @cardinality = args[:cardinality] if args.key?(:cardinality)
  @default_value = args[:default_value] if args.key?(:default_value)
  @json_name = args[:json_name] if args.key?(:json_name)
  @kind = args[:kind] if args.key?(:kind)
  @name = args[:name] if args.key?(:name)
  @number = args[:number] if args.key?(:number)
  @oneof_index = args[:oneof_index] if args.key?(:oneof_index)
  @options = args[:options] if args.key?(:options)
  @packed = args[:packed] if args.key?(:packed)
  @type_url = args[:type_url] if args.key?(:type_url)
end