Class: Google::Apis::ServiceusageV1beta1::GoogleApiServiceusageV1ServiceConfig

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

Overview

The configuration of the service.

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

Returns a new instance of GoogleApiServiceusageV1ServiceConfig.



2014
2015
2016
# File 'generated/google/apis/serviceusage_v1beta1/classes.rb', line 2014

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

Instance Attribute Details

#apisArray<Google::Apis::ServiceusageV1beta1::Api>

A list of API interfaces exported by this service. Contains only the names, versions, and method names of the interfaces. Corresponds to the JSON property apis



1875
1876
1877
# File 'generated/google/apis/serviceusage_v1beta1/classes.rb', line 1875

def apis
  @apis
end

#authenticationGoogle::Apis::ServiceusageV1beta1::Authentication

Authentication defines the authentication configuration for an API. Example for an API targeted for external use: name: calendar.googleapis.com authentication: providers:



1891
1892
1893
# File 'generated/google/apis/serviceusage_v1beta1/classes.rb', line 1891

def authentication
  @authentication
end

#documentationGoogle::Apis::ServiceusageV1beta1::Documentation

Documentation provides the information for describing a service. Example:

documentation:
summary: >
The Google Calendar API gives access
to most calendar features.
pages:
- name: Overview
content: (== include google/foo/overview.md ==)
- name: Tutorial
content: (== include google/foo/tutorial.md ==)
subpages;
- name: Java
content: (== include google/foo/tutorial_java.md ==)
rules:
- selector: google.calendar.Calendar.Get
description: >
...
- selector: google.calendar.Calendar.Put
description: >
...

Documentation is provided in markdown syntax. In addition to standard markdown features, definition lists, tables and fenced code blocks are supported. Section headers can be provided and are interpreted relative to the section nesting of the context where a documentation fragment is embedded. Documentation from the IDL is merged with documentation defined via the config at normalization time, where documentation provided by config rules overrides IDL provided. A number of constructs specific to the API platform are supported in documentation text. In order to reference a proto element, the following notation can be used:

[fully.qualified.proto.name][]

To override the display text used for the link, this can be used:

[display text][fully.qualified.proto.name]

Text can be excluded from doc using the following notation:

(-- internal comment --)

A few directives are available in documentation. Note that directives must appear on a single line to be properly identified. The include directive includes a markdown file from an external source:

(== include path/to/file ==)

The resource_for directive marks a message to be the resource of a collection in REST view. If it is not specified, tools attempt to infer the resource from the operations in a collection:

(== resource_for v1.shelves.books ==)

The directive suppress_warning does not directly affect documentation and is documented together with service config validation. Corresponds to the JSON property documentation



1945
1946
1947
# File 'generated/google/apis/serviceusage_v1beta1/classes.rb', line 1945

def documentation
  @documentation
end

#endpointsArray<Google::Apis::ServiceusageV1beta1::Endpoint>

Configuration for network endpoints. Contains only the names and aliases of the endpoints. Corresponds to the JSON property endpoints



1951
1952
1953
# File 'generated/google/apis/serviceusage_v1beta1/classes.rb', line 1951

def endpoints
  @endpoints
end

#nameString

The DNS address at which this service is available. An example DNS address would be: calendar.googleapis.com. Corresponds to the JSON property name

Returns:

  • (String)


1958
1959
1960
# File 'generated/google/apis/serviceusage_v1beta1/classes.rb', line 1958

def name
  @name
end

#quotaGoogle::Apis::ServiceusageV1beta1::Quota

Quota configuration helps to achieve fairness and budgeting in service usage. The metric based quota configuration works this way:

  • The service configuration defines a set of metrics.
  • For API calls, the quota.metric_rules maps methods to metrics with corresponding costs.
  • The quota.limits defines limits on the metrics, which will be used for quota checks at runtime. An example quota configuration in yaml format: quota: limits:
  • name: apiWriteQpsPerProject metric: library.googleapis.com/write_calls unit: "1/min/project" # rate limit for consumer projects values: STANDARD: 10000 # The metric rules bind all methods to the read_calls metric, # except for the UpdateBook and DeleteBook methods. These two methods # are mapped to the write_calls metric, with the UpdateBook method # consuming at twice rate as the DeleteBook method. metric_rules:
  • selector: "*" metric_costs: library.googleapis.com/read_calls: 1
  • selector: google.example.library.v1.LibraryService.UpdateBook metric_costs: library.googleapis.com/write_calls: 2
  • selector: google.example.library.v1.LibraryService.DeleteBook metric_costs: library.googleapis.com/write_calls: 1 Corresponding Metric definition: metrics:
  • name: library.googleapis.com/read_calls display_name: Read requests metric_kind: DELTA value_type: INT64
  • name: library.googleapis.com/write_calls display_name: Write requests metric_kind: DELTA value_type: INT64 Corresponds to the JSON property quota


2002
2003
2004
# File 'generated/google/apis/serviceusage_v1beta1/classes.rb', line 2002

def quota
  @quota
end

#titleString

The product title for this service. Corresponds to the JSON property title

Returns:

  • (String)


2007
2008
2009
# File 'generated/google/apis/serviceusage_v1beta1/classes.rb', line 2007

def title
  @title
end

#usageGoogle::Apis::ServiceusageV1beta1::Usage

Configuration controlling usage of a service. Corresponds to the JSON property usage



2012
2013
2014
# File 'generated/google/apis/serviceusage_v1beta1/classes.rb', line 2012

def usage
  @usage
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
# File 'generated/google/apis/serviceusage_v1beta1/classes.rb', line 2019

def update!(**args)
  @apis = args[:apis] if args.key?(:apis)
  @authentication = args[:authentication] if args.key?(:authentication)
  @documentation = args[:documentation] if args.key?(:documentation)
  @endpoints = args[:endpoints] if args.key?(:endpoints)
  @name = args[:name] if args.key?(:name)
  @quota = args[:quota] if args.key?(:quota)
  @title = args[:title] if args.key?(:title)
  @usage = args[:usage] if args.key?(:usage)
end