Skip to content

Commit

Permalink
feat(serviceusage): update the API
Browse files Browse the repository at this point in the history
#### serviceusage:v1
The following keys were added:
- schemas.AdminQuotaPolicy.description
- schemas.AdminQuotaPolicy.id
- schemas.AdminQuotaPolicy.properties.container.description
- schemas.AdminQuotaPolicy.properties.container.type
- schemas.AdminQuotaPolicy.properties.dimensions.additionalProperties.type
- schemas.AdminQuotaPolicy.properties.dimensions.description
- schemas.AdminQuotaPolicy.properties.dimensions.type
- schemas.AdminQuotaPolicy.properties.metric.description
- schemas.AdminQuotaPolicy.properties.metric.type
- schemas.AdminQuotaPolicy.properties.name.description
- schemas.AdminQuotaPolicy.properties.name.type
- schemas.AdminQuotaPolicy.properties.policyValue.description
- schemas.AdminQuotaPolicy.properties.policyValue.format
- schemas.AdminQuotaPolicy.properties.policyValue.type
- schemas.AdminQuotaPolicy.properties.unit.description
- schemas.AdminQuotaPolicy.properties.unit.type
- schemas.AdminQuotaPolicy.type
- schemas.ImportAdminQuotaPoliciesResponse.description
- schemas.ImportAdminQuotaPoliciesResponse.id
- schemas.ImportAdminQuotaPoliciesResponse.properties.policies.description
- schemas.ImportAdminQuotaPoliciesResponse.properties.policies.items.$ref
- schemas.ImportAdminQuotaPoliciesResponse.properties.policies.type
- schemas.ImportAdminQuotaPoliciesResponse.type

#### serviceusage:v1beta1
The following keys were added:
- schemas.AdminQuotaPolicy.description
- schemas.AdminQuotaPolicy.id
- schemas.AdminQuotaPolicy.properties.container.description
- schemas.AdminQuotaPolicy.properties.container.type
- schemas.AdminQuotaPolicy.properties.dimensions.additionalProperties.type
- schemas.AdminQuotaPolicy.properties.dimensions.description
- schemas.AdminQuotaPolicy.properties.dimensions.type
- schemas.AdminQuotaPolicy.properties.metric.description
- schemas.AdminQuotaPolicy.properties.metric.type
- schemas.AdminQuotaPolicy.properties.name.description
- schemas.AdminQuotaPolicy.properties.name.type
- schemas.AdminQuotaPolicy.properties.policyValue.description
- schemas.AdminQuotaPolicy.properties.policyValue.format
- schemas.AdminQuotaPolicy.properties.policyValue.type
- schemas.AdminQuotaPolicy.properties.unit.description
- schemas.AdminQuotaPolicy.properties.unit.type
- schemas.AdminQuotaPolicy.type
- schemas.ImportAdminQuotaPoliciesResponse.description
- schemas.ImportAdminQuotaPoliciesResponse.id
- schemas.ImportAdminQuotaPoliciesResponse.properties.policies.description
- schemas.ImportAdminQuotaPoliciesResponse.properties.policies.items.$ref
- schemas.ImportAdminQuotaPoliciesResponse.properties.policies.type
- schemas.ImportAdminQuotaPoliciesResponse.type
  • Loading branch information
yoshi-automation authored and JustinBeckwith committed Jun 5, 2020
1 parent 7e785b1 commit 177d160
Show file tree
Hide file tree
Showing 4 changed files with 176 additions and 2 deletions.
51 changes: 50 additions & 1 deletion discovery/serviceusage-v1.json
Expand Up @@ -426,9 +426,44 @@
}
}
},
"revision": "20200516",
"revision": "20200603",
"rootUrl": "https://serviceusage.googleapis.com/",
"schemas": {
"AdminQuotaPolicy": {
"description": "Quota policy created by quota administrator.",
"id": "AdminQuotaPolicy",
"properties": {
"container": {
"description": "The cloud resource container at which the quota policy is created. The\nformat is {container_type}/{container_number}",
"type": "string"
},
"dimensions": {
"additionalProperties": {
"type": "string"
},
"description": "\nIf this map is nonempty, then this policy applies only to specific values\nfor dimensions defined in the limit unit.\n\nFor example, an policy on a limit with the unit 1/{project}/{region}\ncould contain an entry with the key \"region\" and the value \"us-east-1\";\nthe policy is only applied to quota consumed in that region.\n\nThis map has the following restrictions:\n\n* If \"region\" appears as a key, its value must be a valid Cloud region.\n* If \"zone\" appears as a key, its value must be a valid Cloud zone.\n* Keys other than \"region\" or \"zone\" are not valid.",
"type": "object"
},
"metric": {
"description": "The name of the metric to which this policy applies.\n\nAn example name would be:\n`compute.googleapis.com/cpus`",
"type": "string"
},
"name": {
"description": "The resource name of the policy.\nThis name is generated by the server when the policy is created.\n\nExample names would be:\n`organizations/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/adminPolicies/4a3f2c1d`",
"type": "string"
},
"policyValue": {
"description": "The quota policy value.\nCan be any nonnegative integer, or -1 (unlimited quota).",
"format": "int64",
"type": "string"
},
"unit": {
"description": "The limit unit of the limit to which this policy applies.\n\nAn example unit would be:\n`1/{project}/{region}`\nNote that `{project}` and `{region}` are not placeholders in this example;\nthe literal characters `{` and `}` occur in the string.",
"type": "string"
}
},
"type": "object"
},
"Api": {
"description": "Api is a light-weight descriptor for an API Interface.\n\nInterfaces are also described as \"protocol buffer services\" in some contexts,\nsuch as by the \"service\" keyword in a .proto file, but they are different\nfrom API Services, which represent a concrete implementation of an interface\nas opposed to simply a description of methods and bindings. They are also\nsometimes simply referred to as \"APIs\" in other contexts, such as the name of\nthis message itself. See https://cloud.google.com/apis/design/glossary for\ndetailed terminology.",
"id": "Api",
Expand Down Expand Up @@ -1593,6 +1628,20 @@
},
"type": "object"
},
"ImportAdminQuotaPoliciesResponse": {
"description": "Response message for ImportAdminQuotaPolicies",
"id": "ImportAdminQuotaPoliciesResponse",
"properties": {
"policies": {
"description": "The policies that were created from the imported data.",
"items": {
"$ref": "AdminQuotaPolicy"
},
"type": "array"
}
},
"type": "object"
},
"ImportConsumerOverridesResponse": {
"description": "Response message for ImportConsumerOverrides",
"id": "ImportConsumerOverridesResponse",
Expand Down
51 changes: 50 additions & 1 deletion discovery/serviceusage-v1beta1.json
Expand Up @@ -764,9 +764,44 @@
}
}
},
"revision": "20200516",
"revision": "20200603",
"rootUrl": "https://serviceusage.googleapis.com/",
"schemas": {
"AdminQuotaPolicy": {
"description": "Quota policy created by quota administrator.",
"id": "AdminQuotaPolicy",
"properties": {
"container": {
"description": "The cloud resource container at which the quota policy is created. The\nformat is {container_type}/{container_number}",
"type": "string"
},
"dimensions": {
"additionalProperties": {
"type": "string"
},
"description": "\nIf this map is nonempty, then this policy applies only to specific values\nfor dimensions defined in the limit unit.\n\nFor example, an policy on a limit with the unit 1/{project}/{region}\ncould contain an entry with the key \"region\" and the value \"us-east-1\";\nthe policy is only applied to quota consumed in that region.\n\nThis map has the following restrictions:\n\n* If \"region\" appears as a key, its value must be a valid Cloud region.\n* If \"zone\" appears as a key, its value must be a valid Cloud zone.\n* Keys other than \"region\" or \"zone\" are not valid.",
"type": "object"
},
"metric": {
"description": "The name of the metric to which this policy applies.\n\nAn example name would be:\n`compute.googleapis.com/cpus`",
"type": "string"
},
"name": {
"description": "The resource name of the policy.\nThis name is generated by the server when the policy is created.\n\nExample names would be:\n`organizations/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/adminPolicies/4a3f2c1d`",
"type": "string"
},
"policyValue": {
"description": "The quota policy value.\nCan be any nonnegative integer, or -1 (unlimited quota).",
"format": "int64",
"type": "string"
},
"unit": {
"description": "The limit unit of the limit to which this policy applies.\n\nAn example unit would be:\n`1/{project}/{region}`\nNote that `{project}` and `{region}` are not placeholders in this example;\nthe literal characters `{` and `}` occur in the string.",
"type": "string"
}
},
"type": "object"
},
"Api": {
"description": "Api is a light-weight descriptor for an API Interface.\n\nInterfaces are also described as \"protocol buffer services\" in some contexts,\nsuch as by the \"service\" keyword in a .proto file, but they are different\nfrom API Services, which represent a concrete implementation of an interface\nas opposed to simply a description of methods and bindings. They are also\nsometimes simply referred to as \"APIs\" in other contexts, such as the name of\nthis message itself. See https://cloud.google.com/apis/design/glossary for\ndetailed terminology.",
"id": "Api",
Expand Down Expand Up @@ -1966,6 +2001,20 @@
},
"type": "object"
},
"ImportAdminQuotaPoliciesResponse": {
"description": "Response message for ImportAdminQuotaPolicies",
"id": "ImportAdminQuotaPoliciesResponse",
"properties": {
"policies": {
"description": "The policies that were created from the imported data.",
"items": {
"$ref": "AdminQuotaPolicy"
},
"type": "array"
}
},
"type": "object"
},
"ImportConsumerOverridesResponse": {
"description": "Response message for ImportConsumerOverrides",
"id": "ImportConsumerOverridesResponse",
Expand Down
38 changes: 38 additions & 0 deletions src/apis/serviceusage/v1.ts
Expand Up @@ -129,6 +129,35 @@ export namespace serviceusage_v1 {
}
}

/**
* Quota policy created by quota administrator.
*/
export interface Schema$AdminQuotaPolicy {
/**
* The cloud resource container at which the quota policy is created. The format is {container_type}/{container_number}
*/
container?: string | null;
/**
* If this map is nonempty, then this policy applies only to specific values for dimensions defined in the limit unit. For example, an policy on a limit with the unit 1/{project}/{region} could contain an entry with the key "region" and the value "us-east-1"; the policy is only applied to quota consumed in that region. This map has the following restrictions: * If "region" appears as a key, its value must be a valid Cloud region. * If "zone" appears as a key, its value must be a valid Cloud zone. * Keys other than "region" or "zone" are not valid.
*/
dimensions?: {[key: string]: string} | null;
/**
* The name of the metric to which this policy applies. An example name would be: `compute.googleapis.com/cpus`
*/
metric?: string | null;
/**
* The resource name of the policy. This name is generated by the server when the policy is created. Example names would be: `organizations/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/adminPolicies/4a3f2c1d`
*/
name?: string | null;
/**
* The quota policy value. Can be any nonnegative integer, or -1 (unlimited quota).
*/
policyValue?: string | null;
/**
* The limit unit of the limit to which this policy applies. An example unit would be: `1/{project}/{region}` Note that `{project}` and `{region}` are not placeholders in this example; the literal characters `{` and `}` occur in the string.
*/
unit?: string | null;
}
/**
* Api is a light-weight descriptor for an API Interface. Interfaces are also described as "protocol buffer services" in some contexts, such as by the "service" keyword in a .proto file, but they are different from API Services, which represent a concrete implementation of an interface as opposed to simply a description of methods and bindings. They are also sometimes simply referred to as "APIs" in other contexts, such as the name of this message itself. See https://cloud.google.com/apis/design/glossary for detailed terminology.
*/
Expand Down Expand Up @@ -955,6 +984,15 @@ export namespace serviceusage_v1 {
*/
overrides?: Schema$QuotaOverride[];
}
/**
* Response message for ImportAdminQuotaPolicies
*/
export interface Schema$ImportAdminQuotaPoliciesResponse {
/**
* The policies that were created from the imported data.
*/
policies?: Schema$AdminQuotaPolicy[];
}
/**
* Response message for ImportConsumerOverrides
*/
Expand Down
38 changes: 38 additions & 0 deletions src/apis/serviceusage/v1beta1.ts
Expand Up @@ -129,6 +129,35 @@ export namespace serviceusage_v1beta1 {
}
}

/**
* Quota policy created by quota administrator.
*/
export interface Schema$AdminQuotaPolicy {
/**
* The cloud resource container at which the quota policy is created. The format is {container_type}/{container_number}
*/
container?: string | null;
/**
* If this map is nonempty, then this policy applies only to specific values for dimensions defined in the limit unit. For example, an policy on a limit with the unit 1/{project}/{region} could contain an entry with the key "region" and the value "us-east-1"; the policy is only applied to quota consumed in that region. This map has the following restrictions: * If "region" appears as a key, its value must be a valid Cloud region. * If "zone" appears as a key, its value must be a valid Cloud zone. * Keys other than "region" or "zone" are not valid.
*/
dimensions?: {[key: string]: string} | null;
/**
* The name of the metric to which this policy applies. An example name would be: `compute.googleapis.com/cpus`
*/
metric?: string | null;
/**
* The resource name of the policy. This name is generated by the server when the policy is created. Example names would be: `organizations/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/adminPolicies/4a3f2c1d`
*/
name?: string | null;
/**
* The quota policy value. Can be any nonnegative integer, or -1 (unlimited quota).
*/
policyValue?: string | null;
/**
* The limit unit of the limit to which this policy applies. An example unit would be: `1/{project}/{region}` Note that `{project}` and `{region}` are not placeholders in this example; the literal characters `{` and `}` occur in the string.
*/
unit?: string | null;
}
/**
* Api is a light-weight descriptor for an API Interface. Interfaces are also described as "protocol buffer services" in some contexts, such as by the "service" keyword in a .proto file, but they are different from API Services, which represent a concrete implementation of an interface as opposed to simply a description of methods and bindings. They are also sometimes simply referred to as "APIs" in other contexts, such as the name of this message itself. See https://cloud.google.com/apis/design/glossary for detailed terminology.
*/
Expand Down Expand Up @@ -987,6 +1016,15 @@ export namespace serviceusage_v1beta1 {
*/
overrides?: Schema$QuotaOverride[];
}
/**
* Response message for ImportAdminQuotaPolicies
*/
export interface Schema$ImportAdminQuotaPoliciesResponse {
/**
* The policies that were created from the imported data.
*/
policies?: Schema$AdminQuotaPolicy[];
}
/**
* Response message for ImportConsumerOverrides
*/
Expand Down

0 comments on commit 177d160

Please sign in to comment.