Class: Google::Apis::AdminDirectoryV1::Token

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

Overview

JSON template for token resource in Directory API.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Token

Returns a new instance of Token.



3015
3016
3017
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3015

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

Instance Attribute Details

#anonymousBoolean Also known as: anonymous?

Whether the application is registered with Google. The value is true if the application has an anonymous Client ID. Corresponds to the JSON property anonymous

Returns:

  • (Boolean)


2975
2976
2977
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 2975

def anonymous
  @anonymous
end

#client_idString

The Client ID of the application the token is issued to. Corresponds to the JSON property clientId

Returns:

  • (String)


2981
2982
2983
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 2981

def client_id
  @client_id
end

#display_textString

The displayable name of the application the token is issued to. Corresponds to the JSON property displayText

Returns:

  • (String)


2986
2987
2988
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 2986

def display_text
  @display_text
end

#etagString

ETag of the resource. Corresponds to the JSON property etag

Returns:

  • (String)


2991
2992
2993
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 2991

def etag
  @etag
end

#kindString

The type of the API resource. This is always admin#directory#token. Corresponds to the JSON property kind

Returns:

  • (String)


2996
2997
2998
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 2996

def kind
  @kind
end

#native_appBoolean Also known as: native_app?

Whether the token is issued to an installed application. The value is true if the application is installed to a desktop or mobile device. Corresponds to the JSON property nativeApp

Returns:

  • (Boolean)


3002
3003
3004
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3002

def native_app
  @native_app
end

#scopesArray<String>

A list of authorization scopes the application is granted. Corresponds to the JSON property scopes

Returns:

  • (Array<String>)


3008
3009
3010
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3008

def scopes
  @scopes
end

#user_keyString

The unique ID of the user that issued the token. Corresponds to the JSON property userKey

Returns:

  • (String)


3013
3014
3015
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3013

def user_key
  @user_key
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3020

def update!(**args)
  @anonymous = args[:anonymous] if args.key?(:anonymous)
  @client_id = args[:client_id] if args.key?(:client_id)
  @display_text = args[:display_text] if args.key?(:display_text)
  @etag = args[:etag] if args.key?(:etag)
  @kind = args[:kind] if args.key?(:kind)
  @native_app = args[:native_app] if args.key?(:native_app)
  @scopes = args[:scopes] if args.key?(:scopes)
  @user_key = args[:user_key] if args.key?(:user_key)
end