Class: Google::Apis::CesV1::Schema

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

Overview

Represents a select subset of an OpenAPI 3.0 schema object.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Schema

Returns a new instance of Schema.



5861
5862
5863
# File 'lib/google/apis/ces_v1/classes.rb', line 5861

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

Instance Attribute Details

#additional_propertiesGoogle::Apis::CesV1::Schema

Represents a select subset of an OpenAPI 3.0 schema object. Corresponds to the JSON property additionalProperties



5755
5756
5757
# File 'lib/google/apis/ces_v1/classes.rb', line 5755

def additional_properties
  @additional_properties
end

#any_ofArray<Google::Apis::CesV1::Schema>

Optional. The value should be validated against any (one or more) of the subschemas in the list. Corresponds to the JSON property anyOf

Returns:



5761
5762
5763
# File 'lib/google/apis/ces_v1/classes.rb', line 5761

def any_of
  @any_of
end

#defaultObject

Optional. Default value of the data. Corresponds to the JSON property default

Returns:

  • (Object)


5766
5767
5768
# File 'lib/google/apis/ces_v1/classes.rb', line 5766

def default
  @default
end

#defsHash<String,Google::Apis::CesV1::Schema>

Optional. A map of definitions for use by ref. Only allowed at the root of the schema. Corresponds to the JSON property defs

Returns:



5772
5773
5774
# File 'lib/google/apis/ces_v1/classes.rb', line 5772

def defs
  @defs
end

#descriptionString

Optional. The description of the data. Corresponds to the JSON property description

Returns:

  • (String)


5777
5778
5779
# File 'lib/google/apis/ces_v1/classes.rb', line 5777

def description
  @description
end

#enumArray<String>

Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : type:STRING, format:enum, enum:[" EAST", NORTH", "SOUTH", "WEST"] 2. We can define apartment number as : type: INTEGER, format:enum, enum:["101", "201", "301"] Corresponds to the JSON property enum

Returns:

  • (Array<String>)


5785
5786
5787
# File 'lib/google/apis/ces_v1/classes.rb', line 5785

def enum
  @enum
end

#itemsGoogle::Apis::CesV1::Schema

Represents a select subset of an OpenAPI 3.0 schema object. Corresponds to the JSON property items



5790
5791
5792
# File 'lib/google/apis/ces_v1/classes.rb', line 5790

def items
  @items
end

#max_itemsFixnum

Optional. Maximum number of the elements for Type.ARRAY. Corresponds to the JSON property maxItems

Returns:

  • (Fixnum)


5795
5796
5797
# File 'lib/google/apis/ces_v1/classes.rb', line 5795

def max_items
  @max_items
end

#maximumFloat

Optional. Maximum value for Type.INTEGER and Type.NUMBER. Corresponds to the JSON property maximum

Returns:

  • (Float)


5800
5801
5802
# File 'lib/google/apis/ces_v1/classes.rb', line 5800

def maximum
  @maximum
end

#min_itemsFixnum

Optional. Minimum number of the elements for Type.ARRAY. Corresponds to the JSON property minItems

Returns:

  • (Fixnum)


5805
5806
5807
# File 'lib/google/apis/ces_v1/classes.rb', line 5805

def min_items
  @min_items
end

#minimumFloat

Optional. Minimum value for Type.INTEGER and Type.NUMBER. Corresponds to the JSON property minimum

Returns:

  • (Float)


5810
5811
5812
# File 'lib/google/apis/ces_v1/classes.rb', line 5810

def minimum
  @minimum
end

#nullableBoolean Also known as: nullable?

Optional. Indicates if the value may be null. Corresponds to the JSON property nullable

Returns:

  • (Boolean)


5815
5816
5817
# File 'lib/google/apis/ces_v1/classes.rb', line 5815

def nullable
  @nullable
end

#prefix_itemsArray<Google::Apis::CesV1::Schema>

Optional. Schemas of initial elements of Type.ARRAY. Corresponds to the JSON property prefixItems

Returns:



5821
5822
5823
# File 'lib/google/apis/ces_v1/classes.rb', line 5821

def prefix_items
  @prefix_items
end

#propertiesHash<String,Google::Apis::CesV1::Schema>

Optional. Properties of Type.OBJECT. Corresponds to the JSON property properties

Returns:



5826
5827
5828
# File 'lib/google/apis/ces_v1/classes.rb', line 5826

def properties
  @properties
end

#refString

Optional. Allows indirect references between schema nodes. The value should be a valid reference to a child of the root defs. For example, the following schema defines a reference to a schema node named "Pet": type: object properties: pet: ref: #/defs/Pet defs: Pet: type: object properties: name: type: string The value of the "pet" property is a reference to the schema node named "Pet". See details in https://json-schema.org/understanding-json- schema/structuring. Corresponds to the JSON property ref

Returns:

  • (String)


5837
5838
5839
# File 'lib/google/apis/ces_v1/classes.rb', line 5837

def ref
  @ref
end

#requiredArray<String>

Optional. Required properties of Type.OBJECT. Corresponds to the JSON property required

Returns:

  • (Array<String>)


5842
5843
5844
# File 'lib/google/apis/ces_v1/classes.rb', line 5842

def required
  @required
end

#titleString

Optional. The title of the schema. Corresponds to the JSON property title

Returns:

  • (String)


5847
5848
5849
# File 'lib/google/apis/ces_v1/classes.rb', line 5847

def title
  @title
end

#typeString

Required. The type of the data. Corresponds to the JSON property type

Returns:

  • (String)


5852
5853
5854
# File 'lib/google/apis/ces_v1/classes.rb', line 5852

def type
  @type
end

#unique_itemsBoolean Also known as: unique_items?

Optional. Indicate the items in the array must be unique. Only applies to TYPE. ARRAY. Corresponds to the JSON property uniqueItems

Returns:

  • (Boolean)


5858
5859
5860
# File 'lib/google/apis/ces_v1/classes.rb', line 5858

def unique_items
  @unique_items
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
# File 'lib/google/apis/ces_v1/classes.rb', line 5866

def update!(**args)
  @additional_properties = args[:additional_properties] if args.key?(:additional_properties)
  @any_of = args[:any_of] if args.key?(:any_of)
  @default = args[:default] if args.key?(:default)
  @defs = args[:defs] if args.key?(:defs)
  @description = args[:description] if args.key?(:description)
  @enum = args[:enum] if args.key?(:enum)
  @items = args[:items] if args.key?(:items)
  @max_items = args[:max_items] if args.key?(:max_items)
  @maximum = args[:maximum] if args.key?(:maximum)
  @min_items = args[:min_items] if args.key?(:min_items)
  @minimum = args[:minimum] if args.key?(:minimum)
  @nullable = args[:nullable] if args.key?(:nullable)
  @prefix_items = args[:prefix_items] if args.key?(:prefix_items)
  @properties = args[:properties] if args.key?(:properties)
  @ref = args[:ref] if args.key?(:ref)
  @required = args[:required] if args.key?(:required)
  @title = args[:title] if args.key?(:title)
  @type = args[:type] if args.key?(:type)
  @unique_items = args[:unique_items] if args.key?(:unique_items)
end