Class: Google::Apis::FirebasemlV2beta::Schema

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

Overview

Schema is used to define the format of input/output data. Represents a select subset of an OpenAPI 3.0 schema object. More fields may be added in the future as needed.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Schema

Returns a new instance of Schema.



1063
1064
1065
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 1063

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

Instance Attribute Details

#defaultObject

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

Returns:

  • (Object)


956
957
958
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 956

def default
  @default
end

#descriptionString

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

Returns:

  • (String)


961
962
963
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 961

def description
  @description
end

#enumArray<String>

Optional. Possible values of the element of Type.STRING with enum format. For example we can define an Enum Direction as : type:STRING, format:enum, enum:[" EAST", NORTH", "SOUTH", "WEST"] Corresponds to the JSON property enum

Returns:

  • (Array<String>)


968
969
970
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 968

def enum
  @enum
end

#exampleObject

Optional. Example of the object. Will only populated when the object is the root. Corresponds to the JSON property example

Returns:

  • (Object)


974
975
976
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 974

def example
  @example
end

#formatString

Optional. The format of the data. Supported formats: for NUMBER type: "float", "double" for INTEGER type: "int32", "int64" for STRING type: "email", "byte", etc Corresponds to the JSON property format

Returns:

  • (String)


981
982
983
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 981

def format
  @format
end

#itemsGoogle::Apis::FirebasemlV2beta::Schema

Schema is used to define the format of input/output data. Represents a select subset of an OpenAPI 3.0 schema object. More fields may be added in the future as needed. Corresponds to the JSON property items



988
989
990
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 988

def items
  @items
end

#max_itemsFixnum

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

Returns:

  • (Fixnum)


993
994
995
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 993

def max_items
  @max_items
end

#max_lengthFixnum

Optional. Maximum length of the Type.STRING Corresponds to the JSON property maxLength

Returns:

  • (Fixnum)


998
999
1000
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 998

def max_length
  @max_length
end

#max_propertiesFixnum

Optional. Maximum number of the properties for Type.OBJECT. Corresponds to the JSON property maxProperties

Returns:

  • (Fixnum)


1003
1004
1005
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 1003

def max_properties
  @max_properties
end

#maximumFloat

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

Returns:

  • (Float)


1008
1009
1010
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 1008

def maximum
  @maximum
end

#min_itemsFixnum

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

Returns:

  • (Fixnum)


1013
1014
1015
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 1013

def min_items
  @min_items
end

#min_lengthFixnum

Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING Corresponds to the JSON property minLength

Returns:

  • (Fixnum)


1018
1019
1020
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 1018

def min_length
  @min_length
end

#min_propertiesFixnum

Optional. Minimum number of the properties for Type.OBJECT. Corresponds to the JSON property minProperties

Returns:

  • (Fixnum)


1023
1024
1025
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 1023

def min_properties
  @min_properties
end

#minimumFloat

Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type. INTEGER and Type.NUMBER Corresponds to the JSON property minimum

Returns:

  • (Float)


1029
1030
1031
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 1029

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)


1034
1035
1036
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 1034

def nullable
  @nullable
end

#patternString

Optional. Pattern of the Type.STRING to restrict a string to a regular expression. Corresponds to the JSON property pattern

Returns:

  • (String)


1041
1042
1043
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 1041

def pattern
  @pattern
end

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

Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. Corresponds to the JSON property properties

Returns:



1046
1047
1048
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 1046

def properties
  @properties
end

#requiredArray<String>

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

Returns:

  • (Array<String>)


1051
1052
1053
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 1051

def required
  @required
end

#titleString

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

Returns:

  • (String)


1056
1057
1058
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 1056

def title
  @title
end

#typeString

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

Returns:

  • (String)


1061
1062
1063
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 1061

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 1068

def update!(**args)
  @default = args[:default] if args.key?(:default)
  @description = args[:description] if args.key?(:description)
  @enum = args[:enum] if args.key?(:enum)
  @example = args[:example] if args.key?(:example)
  @format = args[:format] if args.key?(:format)
  @items = args[:items] if args.key?(:items)
  @max_items = args[:max_items] if args.key?(:max_items)
  @max_length = args[:max_length] if args.key?(:max_length)
  @max_properties = args[:max_properties] if args.key?(:max_properties)
  @maximum = args[:maximum] if args.key?(:maximum)
  @min_items = args[:min_items] if args.key?(:min_items)
  @min_length = args[:min_length] if args.key?(:min_length)
  @min_properties = args[:min_properties] if args.key?(:min_properties)
  @minimum = args[:minimum] if args.key?(:minimum)
  @nullable = args[:nullable] if args.key?(:nullable)
  @pattern = args[:pattern] if args.key?(:pattern)
  @properties = args[:properties] if args.key?(:properties)
  @required = args[:required] if args.key?(:required)
  @title = args[:title] if args.key?(:title)
  @type = args[:type] if args.key?(:type)
end