Class: Google::Apis::AdminDirectoryV1::SchemaFieldSpec

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

Overview

You can use schemas to add custom fields to user profiles. You can use these fields to store information such as the projects your users work on, their physical locations, their hire dates, or whatever else fits your business needs. For more information, see Custom User Fields.

Defined Under Namespace

Classes: NumericIndexingSpec

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SchemaFieldSpec

Returns a new instance of SchemaFieldSpec.



3536
3537
3538
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 3536

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

Instance Attribute Details

#display_nameString

Display Name of the field. Corresponds to the JSON property displayName

Returns:

  • (String)


3480
3481
3482
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 3480

def display_name
  @display_name
end

#etagString

The ETag of the field. Corresponds to the JSON property etag

Returns:

  • (String)


3485
3486
3487
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 3485

def etag
  @etag
end

#field_idString

The unique identifier of the field (Read-only) Corresponds to the JSON property fieldId

Returns:

  • (String)


3490
3491
3492
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 3490

def field_id
  @field_id
end

#field_nameString

The name of the field. Corresponds to the JSON property fieldName

Returns:

  • (String)


3495
3496
3497
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 3495

def field_name
  @field_name
end

#field_typeString

The type of the field. Corresponds to the JSON property fieldType

Returns:

  • (String)


3500
3501
3502
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 3500

def field_type
  @field_type
end

#indexedBoolean Also known as: indexed?

Boolean specifying whether the field is indexed or not. Default: true. Corresponds to the JSON property indexed

Returns:

  • (Boolean)


3505
3506
3507
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 3505

def indexed
  @indexed
end

#kindString

The kind of resource this is. For schema fields this is always admin# directory#schema#fieldspec. Corresponds to the JSON property kind

Returns:

  • (String)


3512
3513
3514
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 3512

def kind
  @kind
end

#multi_valuedBoolean Also known as: multi_valued?

A boolean specifying whether this is a multi-valued field or not. Default: false. Corresponds to the JSON property multiValued

Returns:

  • (Boolean)


3518
3519
3520
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 3518

def multi_valued
  @multi_valued
end

#numeric_indexing_specGoogle::Apis::AdminDirectoryV1::SchemaFieldSpec::NumericIndexingSpec

Indexing spec for a numeric field. By default, only exact match queries will be supported for numeric fields. Setting the numericIndexingSpec allows range queries to be supported. Corresponds to the JSON property numericIndexingSpec



3526
3527
3528
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 3526

def numeric_indexing_spec
  @numeric_indexing_spec
end

#read_access_typeString

Specifies who can view values of this field. See Retrieve users as a non- administrator for more information. Note: It may take up to 24 hours for changes to this field to be reflected. Corresponds to the JSON property readAccessType

Returns:

  • (String)


3534
3535
3536
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 3534

def read_access_type
  @read_access_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 3541

def update!(**args)
  @display_name = args[:display_name] if args.key?(:display_name)
  @etag = args[:etag] if args.key?(:etag)
  @field_id = args[:field_id] if args.key?(:field_id)
  @field_name = args[:field_name] if args.key?(:field_name)
  @field_type = args[:field_type] if args.key?(:field_type)
  @indexed = args[:indexed] if args.key?(:indexed)
  @kind = args[:kind] if args.key?(:kind)
  @multi_valued = args[:multi_valued] if args.key?(:multi_valued)
  @numeric_indexing_spec = args[:numeric_indexing_spec] if args.key?(:numeric_indexing_spec)
  @read_access_type = args[:read_access_type] if args.key?(:read_access_type)
end