Reference documentation and code samples for the Service Usage V1 API class Google::Protobuf::Field.
A single field of a message type.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#cardinality
def cardinality() -> ::Google::Protobuf::Field::Cardinality
    Returns
    
  - (::Google::Protobuf::Field::Cardinality) — The field cardinality.
#cardinality=
def cardinality=(value) -> ::Google::Protobuf::Field::Cardinality
    Parameter
    
  - value (::Google::Protobuf::Field::Cardinality) — The field cardinality.
    Returns
    
  - (::Google::Protobuf::Field::Cardinality) — The field cardinality.
#default_value
def default_value() -> ::String
    Returns
    
  - (::String) — The string value of the default value of this field. Proto2 syntax only.
#default_value=
def default_value=(value) -> ::String
    Parameter
    
  - value (::String) — The string value of the default value of this field. Proto2 syntax only.
    Returns
    
  - (::String) — The string value of the default value of this field. Proto2 syntax only.
#json_name
def json_name() -> ::String
    Returns
    
  - (::String) — The field JSON name.
#json_name=
def json_name=(value) -> ::String
    Parameter
    
  - value (::String) — The field JSON name.
    Returns
    
  - (::String) — The field JSON name.
#kind
def kind() -> ::Google::Protobuf::Field::Kind
    Returns
    
  - (::Google::Protobuf::Field::Kind) — The field type.
#kind=
def kind=(value) -> ::Google::Protobuf::Field::Kind
    Parameter
    
  - value (::Google::Protobuf::Field::Kind) — The field type.
    Returns
    
  - (::Google::Protobuf::Field::Kind) — The field type.
#name
def name() -> ::String
    Returns
    
  - (::String) — The field name.
#name=
def name=(value) -> ::String
    Parameter
    
  - value (::String) — The field name.
    Returns
    
  - (::String) — The field name.
#number
def number() -> ::Integer
    Returns
    
  - (::Integer) — The field number.
#number=
def number=(value) -> ::Integer
    Parameter
    
  - value (::Integer) — The field number.
    Returns
    
  - (::Integer) — The field number.
#oneof_index
def oneof_index() -> ::Integer
    Returns
    
  - 
        (::Integer) — 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.
#oneof_index=
def oneof_index=(value) -> ::Integer
    Parameter
    
  - 
        value (::Integer) — 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.
    Returns
    
  - 
        (::Integer) — 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.
#options
def options() -> ::Array<::Google::Protobuf::Option>
    Returns
    
  - (::Array<::Google::Protobuf::Option>) — The protocol buffer options.
#options=
def options=(value) -> ::Array<::Google::Protobuf::Option>
    Parameter
    
  - value (::Array<::Google::Protobuf::Option>) — The protocol buffer options.
    Returns
    
  - (::Array<::Google::Protobuf::Option>) — The protocol buffer options.
#packed
def packed() -> ::Boolean
    Returns
    
  - (::Boolean) — Whether to use alternative packed wire representation.
#packed=
def packed=(value) -> ::Boolean
    Parameter
    
  - value (::Boolean) — Whether to use alternative packed wire representation.
    Returns
    
  - (::Boolean) — Whether to use alternative packed wire representation.
#type_url
def type_url() -> ::String
    Returns
    
  - 
        (::String) — The field type URL, without the scheme, for message or enumeration
types. Example: "type.googleapis.com/google.protobuf.Timestamp".
#type_url=
def type_url=(value) -> ::String
    Parameter
    
  - 
        value (::String) — The field type URL, without the scheme, for message or enumeration
types. Example: "type.googleapis.com/google.protobuf.Timestamp".
    Returns
    
- 
        (::String) — The field type URL, without the scheme, for message or enumeration
types. Example: "type.googleapis.com/google.protobuf.Timestamp".