Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: re-enable static typing #1202

Merged
merged 2 commits into from Jun 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
259 changes: 200 additions & 59 deletions src/apis/compute/alpha.ts
Expand Up @@ -778,6 +778,15 @@ export namespace compute_alpha {
* images are encrypted with your own keys.
*/
sourceImageEncryptionKey?: Schema$CustomerEncryptionKey;
/**
* The source snapshot to create this disk. When creating a new instance,
* one of initializeParams.sourceSnapshot or disks.source is required except
* for local SSD. To create a disk with a snapshot that you created,
* specify the snapshot name in the following format:
* global/snapshots/my-backup If the source snapshot is deleted later,
* this field will not be set.
*/
sourceSnapshot?: string;
}
/**
* Specifies the audit configuration for a service. The configuration
Expand Down Expand Up @@ -1677,12 +1686,32 @@ export namespace compute_alpha {
export interface Schema$BackendServiceIAP {
enabled?: boolean;
oauth2ClientId?: string;
/**
* [Input Only] OAuth client info required to generate client id to be used
* for IAP.
*/
oauth2ClientInfo?: Schema$BackendServiceIAPOAuth2ClientInfo;
oauth2ClientSecret?: string;
/**
* [Output Only] SHA256 hash value for the field oauth2_client_secret above.
*/
oauth2ClientSecretSha256?: string;
}
export interface Schema$BackendServiceIAPOAuth2ClientInfo {
/**
* Application name to be used in OAuth consent screen.
*/
applicationName?: string;
/**
* Name of the client to be generated. Optional - If not provided, the name
* will be autogenerated by the backend.
*/
clientName?: string;
/**
* Developer's information to be used in OAuth consent screen.
*/
developerEmailAddress?: string;
}
/**
* Contains a list of BackendService resources.
*/
Expand Down Expand Up @@ -1887,9 +1916,8 @@ export namespace compute_alpha {
statusMessage?: string;
/**
* The type of commitment, which affects the discount rate and the eligible
* resources. Type MEMORY_OPTIMIZED_VM specifies a commitment that will only
* apply to memory optimized VMs. Type NORMAL specifies a commitment that
* applies to all other resources.
* resources. Type MEMORY_OPTIMIZED specifies a commitment that will only
* apply to memory optimized machines.
*/
type?: string;
}
Expand Down Expand Up @@ -2649,9 +2677,7 @@ export namespace compute_alpha {
disabled?: boolean;
/**
* This field denotes whether to enable logging for a particular firewall
* rule. If logging is enabled, logs will be exported to the configured
* export destination for all firewall logs in the network. Logs may be
* exported to BigQuery or Pub/Sub.
* rule. If logging is enabled, logs will be exported to Stackdriver.
*/
enableLogging?: boolean;
/**
Expand Down Expand Up @@ -3865,6 +3891,51 @@ export namespace compute_alpha {
*/
warning?: any;
}
export interface Schema$HTTPSHealthCheck {
/**
* The value of the host header in the HTTPS health check request. If left
* empty (default value), the IP on behalf of which this health check is
* performed will be used.
*/
host?: string;
/**
* The TCP port number for the health check request. The default value is
* 443. Valid values are 1 through 65535.
*/
port?: number;
/**
* Port name as defined in InstanceGroup#NamedPort#name. If both port and
* port_name are defined, port takes precedence.
*/
portName?: string;
/**
* Specifies how port is selected for health checking, can be one of
* following values: USE_FIXED_PORT: The port number in port is used for
* health checking. USE_NAMED_PORT: The portName is used for health
* checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port specified
* for each network endpoint is used for health checking. For other
* backends, the port or named port specified in the Backend Service is used
* for health checking. If not specified, HTTPS health check follows
* behavior specified in port and portName fields.
*/
portSpecification?: string;
/**
* Specifies the type of proxy header to append before sending data to the
* backend, either NONE or PROXY_V1. The default is NONE.
*/
proxyHeader?: string;
/**
* The request path of the HTTPS health check request. The default value is
* /.
*/
requestPath?: string;
/**
* The string to match anywhere in the first 1024 bytes of the response
* body. If left empty (the default value), the status code determines
* health. The response data can only be ASCII.
*/
response?: string;
}
/**
* An HttpsHealthCheck resource. This resource defines a template for how
* individual instances should be checked for health, via HTTPS.
Expand Down Expand Up @@ -3940,51 +4011,6 @@ export namespace compute_alpha {
*/
unhealthyThreshold?: number;
}
export interface Schema$HTTPSHealthCheck {
/**
* The value of the host header in the HTTPS health check request. If left
* empty (default value), the IP on behalf of which this health check is
* performed will be used.
*/
host?: string;
/**
* The TCP port number for the health check request. The default value is
* 443. Valid values are 1 through 65535.
*/
port?: number;
/**
* Port name as defined in InstanceGroup#NamedPort#name. If both port and
* port_name are defined, port takes precedence.
*/
portName?: string;
/**
* Specifies how port is selected for health checking, can be one of
* following values: USE_FIXED_PORT: The port number in port is used for
* health checking. USE_NAMED_PORT: The portName is used for health
* checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port specified
* for each network endpoint is used for health checking. For other
* backends, the port or named port specified in the Backend Service is used
* for health checking. If not specified, HTTPS health check follows
* behavior specified in port and portName fields.
*/
portSpecification?: string;
/**
* Specifies the type of proxy header to append before sending data to the
* backend, either NONE or PROXY_V1. The default is NONE.
*/
proxyHeader?: string;
/**
* The request path of the HTTPS health check request. The default value is
* /.
*/
requestPath?: string;
/**
* The string to match anywhere in the first 1024 bytes of the response
* body. If left empty (the default value), the status code determines
* health. The response data can only be ASCII.
*/
response?: string;
}
/**
* Contains a list of HttpsHealthCheck resources.
*/
Expand Down Expand Up @@ -4378,6 +4404,10 @@ export namespace compute_alpha {
serviceAccounts?: Schema$ServiceAccount[];
shieldedVmConfig?: Schema$ShieldedVmConfig;
shieldedVmIntegrityPolicy?: Schema$ShieldedVmIntegrityPolicy;
/**
* Source machine image
*/
sourceMachineImage?: string;
/**
* [Output Only] Whether a VM has been restricted for start because Compute
* Engine has detected suspicious activity.
Expand Down Expand Up @@ -4627,7 +4657,7 @@ export namespace compute_alpha {
* Fingerprint of this resource. This field may be used in optimistic
* locking. It will be ignored when inserting an InstanceGroupManager. An
* up-to-date fingerprint must be provided in order to update the
* InstanceGroupManager or the field need to be unset.
* InstanceGroupManager.
*/
fingerprint?: string;
/**
Expand Down Expand Up @@ -7417,6 +7447,10 @@ export namespace compute_alpha {
* Instances scheduled on this node.
*/
instances?: string[];
/**
* The name of the node.
*/
name?: string;
/**
* The type of this node.
*/
Expand All @@ -7433,6 +7467,7 @@ export namespace compute_alpha {
* Indexes of the nodes to be deleted from the node group.
*/
nodeIndexes?: number[];
nodes?: string[];
}
export interface Schema$NodeGroupsScopedList {
/**
Expand Down Expand Up @@ -9146,8 +9181,7 @@ export namespace compute_alpha {
*/
name?: string;
/**
* A list of Nat services created in this router. The maximum number of Nat
* services within a Router is 3 for Alpha.
* A list of Nat services created in this router.
*/
nats?: Schema$RouterNat[];
/**
Expand Down Expand Up @@ -9651,7 +9685,7 @@ export namespace compute_alpha {
}
/**
* A security policy is comprised of one or more rules. It can also be
* associated with one or more 'targets'.
* associated with one or more 'targets'. Next available tag: 11
*/
export interface Schema$SecurityPolicy {
/**
Expand Down Expand Up @@ -9682,6 +9716,21 @@ export namespace compute_alpha {
* security policies
*/
kind?: string;
/**
* A fingerprint for the labels being applied to this security policy, which
* is essentially a hash of the labels set used for optimistic locking. The
* fingerprint is initially generated by Compute Engine and changes after
* every request to modify or update labels. You must always provide an
* up-to-date fingerprint hash in order to update or change labels. To see
* the latest fingerprint, make get() request to the security policy.
*/
labelFingerprint?: string;
/**
* Labels to apply to this security policy resource. These can be later
* modified by the setLabels method. Each label key/value must comply with
* RFC1035. Label values may be empty.
*/
labels?: any;
/**
* Name of the resource. Provided by the client when the resource is
* created. The name must be 1-63 characters long, and comply with RFC1035.
Expand Down Expand Up @@ -9950,8 +9999,8 @@ export namespace compute_alpha {
*/
labels?: any;
/**
* Integer license codes indicating which licenses are attached to this
* snapshot.
* [Output Only] Integer license codes indicating which licenses are
* attached to this snapshot.
*/
licenseCodes?: string[];
/**
Expand Down Expand Up @@ -41398,8 +41447,8 @@ export namespace compute_alpha {

/**
* compute.nodeGroups.get
* @desc Returns the specified NodeGroup. Gets a list of available
* NodeGroups by making a list() request.
* @desc Returns the specified NodeGroup. Get a list of available NodeGroups
* by making a list() request.
* @alias compute.nodeGroups.get
* @memberOf! ()
*
Expand Down Expand Up @@ -57059,6 +57108,78 @@ export namespace compute_alpha {
}


/**
* compute.securityPolicies.setLabels
* @desc Sets the labels on a security policy. To learn more about labels,
* read the Labeling Resources documentation.
* @alias compute.securityPolicies.setLabels
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.project Project ID for this request.
* @param {string} params.resource_ Name of the resource for this request.
* @param {().GlobalSetLabelsRequest} params.resource Request body data
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
setLabels(
params?: Params$Resource$Securitypolicies$Setlabels,
options?: MethodOptions): AxiosPromise<Schema$Operation>;
setLabels(
params: Params$Resource$Securitypolicies$Setlabels,
options: MethodOptions|BodyResponseCallback<Schema$Operation>,
callback: BodyResponseCallback<Schema$Operation>): void;
setLabels(
params: Params$Resource$Securitypolicies$Setlabels,
callback: BodyResponseCallback<Schema$Operation>): void;
setLabels(callback: BodyResponseCallback<Schema$Operation>): void;
setLabels(
paramsOrCallback?: Params$Resource$Securitypolicies$Setlabels|
BodyResponseCallback<Schema$Operation>,
optionsOrCallback?: MethodOptions|
BodyResponseCallback<Schema$Operation>,
callback?: BodyResponseCallback<Schema$Operation>):
void|AxiosPromise<Schema$Operation> {
let params = (paramsOrCallback || {}) as
Params$Resource$Securitypolicies$Setlabels;
let options = (optionsOrCallback || {}) as MethodOptions;

if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Securitypolicies$Setlabels;
options = {};
}

if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}

const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url:
(rootUrl +
'/compute/alpha/projects/{project}/global/securityPolicies/{resource}/setLabels')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'POST'
},
options),
params,
requiredParams: ['project', 'resource'],
pathParams: ['project', 'resource'],
context: this.getRoot()
};
if (callback) {
createAPIRequest<Schema$Operation>(parameters, callback);
} else {
return createAPIRequest<Schema$Operation>(parameters);
}
}


/**
* compute.securityPolicies.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
Expand Down Expand Up @@ -57439,6 +57560,26 @@ export namespace compute_alpha {
*/
securityPolicy?: string;
}
export interface Params$Resource$Securitypolicies$Setlabels {
/**
* Auth client or API Key for the request
*/
auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

/**
* Project ID for this request.
*/
project?: string;
/**
* Name of the resource for this request.
*/
resource?: string;

/**
* Request body metadata
*/
requestBody?: Schema$GlobalSetLabelsRequest;
}
export interface Params$Resource$Securitypolicies$Testiampermissions {
/**
* Auth client or API Key for the request
Expand Down