Class: Google::Apis::ServiceusageV1::Enum

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

Enum type definition. New usages of this message as an alternative to EnumDescriptorProto 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) ⇒ Enum

Returns a new instance of Enum.



1959
1960
1961
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 1959

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)


1931
1932
1933
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 1931

def edition
  @edition
end

#enumvalueArray<Google::Apis::ServiceusageV1::EnumValue>

Enum value definitions. Corresponds to the JSON property enumvalue



1936
1937
1938
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 1936

def enumvalue
  @enumvalue
end

#nameString

Enum type name. Corresponds to the JSON property name

Returns:

  • (String)


1941
1942
1943
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 1941

def name
  @name
end

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

Protocol buffer options. Corresponds to the JSON property options



1946
1947
1948
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 1946

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



1952
1953
1954
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 1952

def source_context
  @source_context
end

#syntaxString

The source syntax. Corresponds to the JSON property syntax

Returns:

  • (String)


1957
1958
1959
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 1957

def syntax
  @syntax
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1964
1965
1966
1967
1968
1969
1970
1971
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 1964

def update!(**args)
  @edition = args[:edition] if args.key?(:edition)
  @enumvalue = args[:enumvalue] if args.key?(:enumvalue)
  @name = args[:name] if args.key?(:name)
  @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