Class: Google::Apis::DiscoveryV1::RestDescription

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

Defined Under Namespace

Classes: Auth, Icons

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) ⇒ RestDescription

Returns a new instance of RestDescription.


546
547
548
# File 'generated/google/apis/discovery_v1/classes.rb', line 546

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

Instance Attribute Details

#api_methodsHash<String,Google::Apis::DiscoveryV1::RestMethod>

API-level methods for this API. Corresponds to the JSON property methods

Returns:


471
472
473
# File 'generated/google/apis/discovery_v1/classes.rb', line 471

def api_methods
  @api_methods
end

#authGoogle::Apis::DiscoveryV1::RestDescription::Auth

Authentication information. Corresponds to the JSON property auth


394
395
396
# File 'generated/google/apis/discovery_v1/classes.rb', line 394

def auth
  @auth
end

#base_pathString

[DEPRECATED] The base path for REST requests. Corresponds to the JSON property basePath

Returns:

  • (String)

399
400
401
# File 'generated/google/apis/discovery_v1/classes.rb', line 399

def base_path
  @base_path
end

#base_urlString

[DEPRECATED] The base URL for REST requests. Corresponds to the JSON property baseUrl

Returns:

  • (String)

404
405
406
# File 'generated/google/apis/discovery_v1/classes.rb', line 404

def base_url
  @base_url
end

#batch_pathString

The path for REST batch requests. Corresponds to the JSON property batchPath

Returns:

  • (String)

409
410
411
# File 'generated/google/apis/discovery_v1/classes.rb', line 409

def batch_path
  @batch_path
end

#canonical_nameString

Indicates how the API name should be capitalized and split into various parts. Useful for generating pretty class names. Corresponds to the JSON property canonicalName

Returns:

  • (String)

415
416
417
# File 'generated/google/apis/discovery_v1/classes.rb', line 415

def canonical_name
  @canonical_name
end

#descriptionString

The description of this API. Corresponds to the JSON property description

Returns:

  • (String)

420
421
422
# File 'generated/google/apis/discovery_v1/classes.rb', line 420

def description
  @description
end

#discovery_versionString

Indicate the version of the Discovery API used to generate this doc. Corresponds to the JSON property discoveryVersion

Returns:

  • (String)

425
426
427
# File 'generated/google/apis/discovery_v1/classes.rb', line 425

def discovery_version
  @discovery_version
end

A link to human readable documentation for the API. Corresponds to the JSON property documentationLink

Returns:

  • (String)

430
431
432
# File 'generated/google/apis/discovery_v1/classes.rb', line 430

def documentation_link
  @documentation_link
end

#etagString

The ETag for this response. Corresponds to the JSON property etag

Returns:

  • (String)

435
436
437
# File 'generated/google/apis/discovery_v1/classes.rb', line 435

def etag
  @etag
end

#exponential_backoff_defaultBoolean Also known as: exponential_backoff_default?

Enable exponential backoff for suitable methods in the generated clients. Corresponds to the JSON property exponentialBackoffDefault

Returns:

  • (Boolean)

440
441
442
# File 'generated/google/apis/discovery_v1/classes.rb', line 440

def exponential_backoff_default
  @exponential_backoff_default
end

#featuresArray<String>

A list of supported features for this API. Corresponds to the JSON property features

Returns:

  • (Array<String>)

446
447
448
# File 'generated/google/apis/discovery_v1/classes.rb', line 446

def features
  @features
end

#force_alt_jsonObject Also known as: force_alt_json?

Returns the value of attribute force_alt_json


102
103
104
# File 'lib/google/apis/generator/model.rb', line 102

def force_alt_json
  @force_alt_json
end

#iconsGoogle::Apis::DiscoveryV1::RestDescription::Icons

Links to 16x16 and 32x32 icons representing the API. Corresponds to the JSON property icons


451
452
453
# File 'generated/google/apis/discovery_v1/classes.rb', line 451

def icons
  @icons
end

#idString

The ID of this API. Corresponds to the JSON property id

Returns:

  • (String)

456
457
458
# File 'generated/google/apis/discovery_v1/classes.rb', line 456

def id
  @id
end

#kindString

The kind for this response. Corresponds to the JSON property kind

Returns:

  • (String)

461
462
463
# File 'generated/google/apis/discovery_v1/classes.rb', line 461

def kind
  @kind
end

#labelsArray<String>

Labels for the status of this API, such as labs or deprecated. Corresponds to the JSON property labels

Returns:

  • (Array<String>)

466
467
468
# File 'generated/google/apis/discovery_v1/classes.rb', line 466

def labels
  @labels
end

#nameString

The name of this API. Corresponds to the JSON property name

Returns:

  • (String)

476
477
478
# File 'generated/google/apis/discovery_v1/classes.rb', line 476

def name
  ActiveSupport::Inflector.camelize(@name)
end

#owner_domainString

The domain of the owner of this API. Together with the ownerName and a packagePath values, this can be used to generate a library for this API which would have a unique fully qualified name. Corresponds to the JSON property ownerDomain

Returns:

  • (String)

483
484
485
# File 'generated/google/apis/discovery_v1/classes.rb', line 483

def owner_domain
  @owner_domain
end

#owner_nameString

The name of the owner of this API. See ownerDomain. Corresponds to the JSON property ownerName

Returns:

  • (String)

488
489
490
# File 'generated/google/apis/discovery_v1/classes.rb', line 488

def owner_name
  @owner_name
end

#package_pathString

The package of the owner of this API. See ownerDomain. Corresponds to the JSON property packagePath

Returns:

  • (String)

493
494
495
# File 'generated/google/apis/discovery_v1/classes.rb', line 493

def package_path
  @package_path
end

#parametersHash<String,Google::Apis::DiscoveryV1::JsonSchema>

Common parameters that apply across all apis. Corresponds to the JSON property parameters

Returns:


498
499
500
# File 'generated/google/apis/discovery_v1/classes.rb', line 498

def parameters
  @parameters
end

#protocolString

The protocol described by this document. Corresponds to the JSON property protocol

Returns:

  • (String)

503
504
505
# File 'generated/google/apis/discovery_v1/classes.rb', line 503

def protocol
  @protocol
end

#resourcesHash<String,Google::Apis::DiscoveryV1::RestResource>

The resources in this API. Corresponds to the JSON property resources

Returns:


508
509
510
# File 'generated/google/apis/discovery_v1/classes.rb', line 508

def resources
  @resources
end

#revisionString

The version of this API. Corresponds to the JSON property revision

Returns:

  • (String)

513
514
515
# File 'generated/google/apis/discovery_v1/classes.rb', line 513

def revision
  @revision
end

#root_urlString

The root URL under which all API services live. Corresponds to the JSON property rootUrl

Returns:

  • (String)

518
519
520
# File 'generated/google/apis/discovery_v1/classes.rb', line 518

def root_url
  @root_url
end

#schemasHash<String,Google::Apis::DiscoveryV1::JsonSchema>

The schemas for this API. Corresponds to the JSON property schemas

Returns:


523
524
525
# File 'generated/google/apis/discovery_v1/classes.rb', line 523

def schemas
  @schemas
end

#service_pathString

The base path for all REST requests. Corresponds to the JSON property servicePath

Returns:

  • (String)

528
529
530
# File 'generated/google/apis/discovery_v1/classes.rb', line 528

def service_path
  @service_path
end

#titleString

The title of this API. Corresponds to the JSON property title

Returns:

  • (String)

533
534
535
# File 'generated/google/apis/discovery_v1/classes.rb', line 533

def title
  @title
end

#versionString

The version of this API. Corresponds to the JSON property version

Returns:

  • (String)

538
539
540
# File 'generated/google/apis/discovery_v1/classes.rb', line 538

def version
  ActiveSupport::Inflector.camelize(@version.gsub(/\W/, '-')).gsub(/-/, '_')
end

#version_moduleBoolean Also known as: version_module?

Corresponds to the JSON property version_module

Returns:

  • (Boolean)

543
544
545
# File 'generated/google/apis/discovery_v1/classes.rb', line 543

def version_module
  @version_module
end

Instance Method Details

#all_methodsObject


126
127
128
129
130
131
# File 'lib/google/apis/generator/model.rb', line 126

def all_methods
  m = []
  m << api_methods.values unless api_methods.nil?
  m << resources.map { |_k, r| r.all_methods } unless resources.nil?
  m.flatten
end

#module_nameObject


113
114
115
# File 'lib/google/apis/generator/model.rb', line 113

def module_name
  name + version
end

#qualified_nameObject


117
118
119
# File 'lib/google/apis/generator/model.rb', line 117

def qualified_name
  sprintf('Google::Apis::%s', module_name)
end

#service_nameObject


121
122
123
124
# File 'lib/google/apis/generator/model.rb', line 121

def service_name
  class_name = (canonical_name || name).gsub(/\W/, '')
  ActiveSupport::Inflector.camelize(sprintf('%sService', class_name))
end

#update!(**args) ⇒ Object

Update properties of this object


551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
# File 'generated/google/apis/discovery_v1/classes.rb', line 551

def update!(**args)
  @auth = args[:auth] if args.key?(:auth)
  @base_path = args[:base_path] if args.key?(:base_path)
  @base_url = args[:base_url] if args.key?(:base_url)
  @batch_path = args[:batch_path] if args.key?(:batch_path)
  @canonical_name = args[:canonical_name] if args.key?(:canonical_name)
  @description = args[:description] if args.key?(:description)
  @discovery_version = args[:discovery_version] if args.key?(:discovery_version)
  @documentation_link = args[:documentation_link] if args.key?(:documentation_link)
  @etag = args[:etag] if args.key?(:etag)
  @exponential_backoff_default = args[:exponential_backoff_default] if args.key?(:exponential_backoff_default)
  @features = args[:features] if args.key?(:features)
  @icons = args[:icons] if args.key?(:icons)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @labels = args[:labels] if args.key?(:labels)
  @api_methods = args[:api_methods] if args.key?(:api_methods)
  @name = args[:name] if args.key?(:name)
  @owner_domain = args[:owner_domain] if args.key?(:owner_domain)
  @owner_name = args[:owner_name] if args.key?(:owner_name)
  @package_path = args[:package_path] if args.key?(:package_path)
  @parameters = args[:parameters] if args.key?(:parameters)
  @protocol = args[:protocol] if args.key?(:protocol)
  @resources = args[:resources] if args.key?(:resources)
  @revision = args[:revision] if args.key?(:revision)
  @root_url = args[:root_url] if args.key?(:root_url)
  @schemas = args[:schemas] if args.key?(:schemas)
  @service_path = args[:service_path] if args.key?(:service_path)
  @title = args[:title] if args.key?(:title)
  @version = args[:version] if args.key?(:version)
  @version_module = args[:version_module] if args.key?(:version_module)
end