Service Usage V1 API - Class Google::Protobuf::Field (v1.3.0)

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

defcardinality()->::Google::Protobuf::Field::Cardinality
Returns

#cardinality=

defcardinality=(value)->::Google::Protobuf::Field::Cardinality
Parameter
Returns

#default_value

defdefault_value()->::String
Returns
  • (::String) — The string value of the default value of this field. Proto2 syntax only.

#default_value=

defdefault_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

defjson_name()->::String
Returns
  • (::String) — The field JSON name.

#json_name=

defjson_name=(value)->::String
Parameter
  • value (::String) — The field JSON name.
Returns
  • (::String) — The field JSON name.

#kind

defkind()->::Google::Protobuf::Field::Kind
Returns

#kind=

defkind=(value)->::Google::Protobuf::Field::Kind
Parameter
Returns

#name

defname()->::String
Returns
  • (::String) — The field name.

#name=

defname=(value)->::String
Parameter
  • value (::String) — The field name.
Returns
  • (::String) — The field name.

#number

defnumber()->::Integer
Returns
  • (::Integer) — The field number.

#number=

defnumber=(value)->::Integer
Parameter
  • value (::Integer) — The field number.
Returns
  • (::Integer) — The field number.

#oneof_index

defoneof_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=

defoneof_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

defoptions()->::Array<::Google::Protobuf::Option>
Returns

#options=

defoptions=(value)->::Array<::Google::Protobuf::Option>
Parameter
Returns

#packed

defpacked()->::Boolean
Returns
  • (::Boolean) — Whether to use alternative packed wire representation.

#packed=

defpacked=(value)->::Boolean
Parameter
  • value (::Boolean) — Whether to use alternative packed wire representation.
Returns
  • (::Boolean) — Whether to use alternative packed wire representation.

#type_url

deftype_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=

deftype_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".

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.