Class: Google::Apis::ServiceusageV1::Type

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

Overview

A protocol buffer message type. New usages of this message as an alternative to DescriptorProto are strongly discouraged. This message does not reliability preserve all information necessary to model the schema and preserve semantics. Instead make use of FileDescriptorSet which preserves the necessary information.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Type

Returns a new instance of Type.



5521
5522
5523
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 5521

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

Instance Attribute Details

#editionString

The source edition string, only valid when syntax is SYNTAX_EDITIONS. Corresponds to the JSON property edition

Returns:

  • (String)


5488
5489
5490
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 5488

def edition
  @edition
end

#fieldsArray<Google::Apis::ServiceusageV1::Field>

The list of fields. Corresponds to the JSON property fields



5493
5494
5495
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 5493

def fields
  @fields
end

#nameString

The fully qualified message name. Corresponds to the JSON property name

Returns:

  • (String)


5498
5499
5500
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 5498

def name
  @name
end

#oneofsArray<String>

The list of types appearing in oneof definitions in this type. Corresponds to the JSON property oneofs

Returns:

  • (Array<String>)


5503
5504
5505
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 5503

def oneofs
  @oneofs
end

#optionsArray<Google::Apis::ServiceusageV1::Option>

The protocol buffer options. Corresponds to the JSON property options



5508
5509
5510
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 5508

def options
  @options
end

#source_contextGoogle::Apis::ServiceusageV1::SourceContext

SourceContext represents information about the source of a protobuf element, like the file in which it is defined. Corresponds to the JSON property sourceContext



5514
5515
5516
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 5514

def source_context
  @source_context
end

#syntaxString

The source syntax. Corresponds to the JSON property syntax

Returns:

  • (String)


5519
5520
5521
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 5519

def syntax
  @syntax
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5526
5527
5528
5529
5530
5531
5532
5533
5534
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 5526

def update!(**args)
  @edition = args[:edition] if args.key?(:edition)
  @fields = args[:fields] if args.key?(:fields)
  @name = args[:name] if args.key?(:name)
  @oneofs = args[:oneofs] if args.key?(:oneofs)
  @options = args[:options] if args.key?(:options)
  @source_context = args[:source_context] if args.key?(:source_context)
  @syntax = args[:syntax] if args.key?(:syntax)
end