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


2255
2256
2257
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 2255

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


2215
2216
2217
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 2215

def anonymous
  @anonymous
end

#client_idString

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


2221
2222
2223
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 2221

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


2226
2227
2228
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 2226

def display_text
  @display_text
end

#etagString

ETag of the resource. Corresponds to the JSON property etag


2231
2232
2233
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 2231

def etag
  @etag
end

#kindString

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


2236
2237
2238
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 2236

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


2242
2243
2244
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 2242

def native_app
  @native_app
end

#scopesArray<String>

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


2248
2249
2250
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 2248

def scopes
  @scopes
end

#user_keyString

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


2253
2254
2255
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 2253

def user_key
  @user_key
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 2260

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