diff --git a/clients/google-api-services-clouddeploy/v1/2.0.0/README.md b/clients/google-api-services-clouddeploy/v1/2.0.0/README.md index 27ba77c25ab..6bac42fc209 100644 --- a/clients/google-api-services-clouddeploy/v1/2.0.0/README.md +++ b/clients/google-api-services-clouddeploy/v1/2.0.0/README.md @@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file: com.google.apis google-api-services-clouddeploy - v1-rev20240809-2.0.0 + v1-rev20240920-2.0.0 @@ -35,7 +35,7 @@ repositories { mavenCentral() } dependencies { - implementation 'com.google.apis:google-api-services-clouddeploy:v1-rev20240809-2.0.0' + implementation 'com.google.apis:google-api-services-clouddeploy:v1-rev20240920-2.0.0' } ``` diff --git a/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/CloudDeploy.java b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/CloudDeploy.java index 616bf6ea933..3e46cb80689 100644 --- a/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/CloudDeploy.java +++ b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/CloudDeploy.java @@ -5917,6 +5917,29 @@ public Create setParent(java.lang.String parent) { return this; } + /** + * Optional. Deploy policies to override. Format is + * `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`. + */ + @com.google.api.client.util.Key + private java.util.List overrideDeployPolicy; + + /** Optional. Deploy policies to override. Format is + `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`. + */ + public java.util.List getOverrideDeployPolicy() { + return overrideDeployPolicy; + } + + /** + * Optional. Deploy policies to override. Format is + * `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`. + */ + public Create setOverrideDeployPolicy(java.util.List overrideDeployPolicy) { + this.overrideDeployPolicy = overrideDeployPolicy; + return this; + } + /** Required. ID of the `Release`. */ @com.google.api.client.util.Key private java.lang.String releaseId; @@ -6967,6 +6990,29 @@ public Create setParent(java.lang.String parent) { return this; } + /** + * Optional. Deploy policies to override. Format is + * `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`. + */ + @com.google.api.client.util.Key + private java.util.List overrideDeployPolicy; + + /** Optional. Deploy policies to override. Format is + `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`. + */ + public java.util.List getOverrideDeployPolicy() { + return overrideDeployPolicy; + } + + /** + * Optional. Deploy policies to override. Format is + * `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`. + */ + public Create setOverrideDeployPolicy(java.util.List overrideDeployPolicy) { + this.overrideDeployPolicy = overrideDeployPolicy; + return this; + } + /** * Optional. A request ID to identify requests. Specify a unique request ID so that if * you must retry your request, the server knows to ignore the request if it has @@ -8296,6 +8342,1149 @@ public Terminate set(String parameterName, Object value) { } } } + /** + * An accessor for creating requests from the DeployPolicies collection. + * + *

The typical use is:

+ *
+       *   {@code CloudDeploy clouddeploy = new CloudDeploy(...);}
+       *   {@code CloudDeploy.DeployPolicies.List request = clouddeploy.deployPolicies().list(parameters ...)}
+       * 
+ * + * @return the resource collection + */ + public DeployPolicies deployPolicies() { + return new DeployPolicies(); + } + + /** + * The "deployPolicies" collection of methods. + */ + public class DeployPolicies { + + /** + * Creates a new DeployPolicy in a given project and location. + * + * Create a request for the method "deployPolicies.create". + * + * This request holds the parameters needed by the clouddeploy server. After setting any optional + * parameters, call the {@link Create#execute()} method to invoke the remote operation. + * + * @param parent Required. The parent collection in which the `DeployPolicy` must be created. The format is + * `projects/{project_id}/locations/{location_name}`. + * @param content the {@link com.google.api.services.clouddeploy.v1.model.DeployPolicy} + * @return the request + */ + public Create create(java.lang.String parent, com.google.api.services.clouddeploy.v1.model.DeployPolicy content) throws java.io.IOException { + Create result = new Create(parent, content); + initialize(result); + return result; + } + + public class Create extends CloudDeployRequest { + + private static final String REST_PATH = "v1/{+parent}/deployPolicies"; + + private final java.util.regex.Pattern PARENT_PATTERN = + java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$"); + + /** + * Creates a new DeployPolicy in a given project and location. + * + * Create a request for the method "deployPolicies.create". + * + * This request holds the parameters needed by the the clouddeploy server. After setting any + * optional parameters, call the {@link Create#execute()} method to invoke the remote operation. + *

{@link + * Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must + * be called to initialize this instance immediately after invoking the constructor.

+ * + * @param parent Required. The parent collection in which the `DeployPolicy` must be created. The format is + * `projects/{project_id}/locations/{location_name}`. + * @param content the {@link com.google.api.services.clouddeploy.v1.model.DeployPolicy} + * @since 1.13 + */ + protected Create(java.lang.String parent, com.google.api.services.clouddeploy.v1.model.DeployPolicy content) { + super(CloudDeploy.this, "POST", REST_PATH, content, com.google.api.services.clouddeploy.v1.model.Operation.class); + this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), + "Parameter parent must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+$"); + } + } + + @Override + public Create set$Xgafv(java.lang.String $Xgafv) { + return (Create) super.set$Xgafv($Xgafv); + } + + @Override + public Create setAccessToken(java.lang.String accessToken) { + return (Create) super.setAccessToken(accessToken); + } + + @Override + public Create setAlt(java.lang.String alt) { + return (Create) super.setAlt(alt); + } + + @Override + public Create setCallback(java.lang.String callback) { + return (Create) super.setCallback(callback); + } + + @Override + public Create setFields(java.lang.String fields) { + return (Create) super.setFields(fields); + } + + @Override + public Create setKey(java.lang.String key) { + return (Create) super.setKey(key); + } + + @Override + public Create setOauthToken(java.lang.String oauthToken) { + return (Create) super.setOauthToken(oauthToken); + } + + @Override + public Create setPrettyPrint(java.lang.Boolean prettyPrint) { + return (Create) super.setPrettyPrint(prettyPrint); + } + + @Override + public Create setQuotaUser(java.lang.String quotaUser) { + return (Create) super.setQuotaUser(quotaUser); + } + + @Override + public Create setUploadType(java.lang.String uploadType) { + return (Create) super.setUploadType(uploadType); + } + + @Override + public Create setUploadProtocol(java.lang.String uploadProtocol) { + return (Create) super.setUploadProtocol(uploadProtocol); + } + + /** + * Required. The parent collection in which the `DeployPolicy` must be created. The format + * is `projects/{project_id}/locations/{location_name}`. + */ + @com.google.api.client.util.Key + private java.lang.String parent; + + /** Required. The parent collection in which the `DeployPolicy` must be created. The format is + `projects/{project_id}/locations/{location_name}`. + */ + public java.lang.String getParent() { + return parent; + } + + /** + * Required. The parent collection in which the `DeployPolicy` must be created. The format + * is `projects/{project_id}/locations/{location_name}`. + */ + public Create setParent(java.lang.String parent) { + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), + "Parameter parent must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+$"); + } + this.parent = parent; + return this; + } + + /** Required. ID of the `DeployPolicy`. */ + @com.google.api.client.util.Key + private java.lang.String deployPolicyId; + + /** Required. ID of the `DeployPolicy`. + */ + public java.lang.String getDeployPolicyId() { + return deployPolicyId; + } + + /** Required. ID of the `DeployPolicy`. */ + public Create setDeployPolicyId(java.lang.String deployPolicyId) { + this.deployPolicyId = deployPolicyId; + return this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID so that if you + * must retry your request, the server knows to ignore the request if it has already been + * completed. The server guarantees that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the request + * times out. If you make the request again with the same request ID, the server can check + * if original operation with the same request ID was received, and if so, will ignore the + * second request. This prevents clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + @com.google.api.client.util.Key + private java.lang.String requestId; + + /** Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry + your request, the server knows to ignore the request if it has already been completed. The server + guarantees that for at least 60 minutes after the first request. For example, consider a situation + where you make an initial request and the request times out. If you make the request again with the + same request ID, the server can check if original operation with the same request ID was received, + and if so, will ignore the second request. This prevents clients from accidentally creating + duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not + supported (00000000-0000-0000-0000-000000000000). + */ + public java.lang.String getRequestId() { + return requestId; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID so that if you + * must retry your request, the server knows to ignore the request if it has already been + * completed. The server guarantees that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the request + * times out. If you make the request again with the same request ID, the server can check + * if original operation with the same request ID was received, and if so, will ignore the + * second request. This prevents clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + public Create setRequestId(java.lang.String requestId) { + this.requestId = requestId; + return this; + } + + /** + * Optional. If set to true, the request is validated and the user is provided with an + * expected result, but no actual change is made. + */ + @com.google.api.client.util.Key + private java.lang.Boolean validateOnly; + + /** Optional. If set to true, the request is validated and the user is provided with an expected + result, but no actual change is made. + */ + public java.lang.Boolean getValidateOnly() { + return validateOnly; + } + + /** + * Optional. If set to true, the request is validated and the user is provided with an + * expected result, but no actual change is made. + */ + public Create setValidateOnly(java.lang.Boolean validateOnly) { + this.validateOnly = validateOnly; + return this; + } + + @Override + public Create set(String parameterName, Object value) { + return (Create) super.set(parameterName, value); + } + } + /** + * Deletes a single DeployPolicy. + * + * Create a request for the method "deployPolicies.delete". + * + * This request holds the parameters needed by the clouddeploy server. After setting any optional + * parameters, call the {@link Delete#execute()} method to invoke the remote operation. + * + * @param name Required. The name of the `DeployPolicy` to delete. The format is + * `projects/{project_id}/locations/{location_name}/deployPolicies/{deploy_policy_name}`. + * @return the request + */ + public Delete delete(java.lang.String name) throws java.io.IOException { + Delete result = new Delete(name); + initialize(result); + return result; + } + + public class Delete extends CloudDeployRequest { + + private static final String REST_PATH = "v1/{+name}"; + + private final java.util.regex.Pattern NAME_PATTERN = + java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/deployPolicies/[^/]+$"); + + /** + * Deletes a single DeployPolicy. + * + * Create a request for the method "deployPolicies.delete". + * + * This request holds the parameters needed by the the clouddeploy server. After setting any + * optional parameters, call the {@link Delete#execute()} method to invoke the remote operation. + *

{@link + * Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must + * be called to initialize this instance immediately after invoking the constructor.

+ * + * @param name Required. The name of the `DeployPolicy` to delete. The format is + * `projects/{project_id}/locations/{location_name}/deployPolicies/{deploy_policy_name}`. + * @since 1.13 + */ + protected Delete(java.lang.String name) { + super(CloudDeploy.this, "DELETE", REST_PATH, null, com.google.api.services.clouddeploy.v1.model.Operation.class); + this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+/deployPolicies/[^/]+$"); + } + } + + @Override + public Delete set$Xgafv(java.lang.String $Xgafv) { + return (Delete) super.set$Xgafv($Xgafv); + } + + @Override + public Delete setAccessToken(java.lang.String accessToken) { + return (Delete) super.setAccessToken(accessToken); + } + + @Override + public Delete setAlt(java.lang.String alt) { + return (Delete) super.setAlt(alt); + } + + @Override + public Delete setCallback(java.lang.String callback) { + return (Delete) super.setCallback(callback); + } + + @Override + public Delete setFields(java.lang.String fields) { + return (Delete) super.setFields(fields); + } + + @Override + public Delete setKey(java.lang.String key) { + return (Delete) super.setKey(key); + } + + @Override + public Delete setOauthToken(java.lang.String oauthToken) { + return (Delete) super.setOauthToken(oauthToken); + } + + @Override + public Delete setPrettyPrint(java.lang.Boolean prettyPrint) { + return (Delete) super.setPrettyPrint(prettyPrint); + } + + @Override + public Delete setQuotaUser(java.lang.String quotaUser) { + return (Delete) super.setQuotaUser(quotaUser); + } + + @Override + public Delete setUploadType(java.lang.String uploadType) { + return (Delete) super.setUploadType(uploadType); + } + + @Override + public Delete setUploadProtocol(java.lang.String uploadProtocol) { + return (Delete) super.setUploadProtocol(uploadProtocol); + } + + /** + * Required. The name of the `DeployPolicy` to delete. The format is + * `projects/{project_id}/locations/{location_name}/deployPolicies/{deploy_policy_name}`. + */ + @com.google.api.client.util.Key + private java.lang.String name; + + /** Required. The name of the `DeployPolicy` to delete. The format is + `projects/{project_id}/locations/{location_name}/deployPolicies/{deploy_policy_name}`. + */ + public java.lang.String getName() { + return name; + } + + /** + * Required. The name of the `DeployPolicy` to delete. The format is + * `projects/{project_id}/locations/{location_name}/deployPolicies/{deploy_policy_name}`. + */ + public Delete setName(java.lang.String name) { + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+/deployPolicies/[^/]+$"); + } + this.name = name; + return this; + } + + /** + * Optional. If set to true, then deleting an already deleted or non-existing + * `DeployPolicy` will succeed. + */ + @com.google.api.client.util.Key + private java.lang.Boolean allowMissing; + + /** Optional. If set to true, then deleting an already deleted or non-existing `DeployPolicy` will + succeed. + */ + public java.lang.Boolean getAllowMissing() { + return allowMissing; + } + + /** + * Optional. If set to true, then deleting an already deleted or non-existing + * `DeployPolicy` will succeed. + */ + public Delete setAllowMissing(java.lang.Boolean allowMissing) { + this.allowMissing = allowMissing; + return this; + } + + /** + * Optional. This checksum is computed by the server based on the value of other fields, + * and may be sent on update and delete requests to ensure the client has an up-to-date + * value before proceeding. + */ + @com.google.api.client.util.Key + private java.lang.String etag; + + /** Optional. This checksum is computed by the server based on the value of other fields, and may be + sent on update and delete requests to ensure the client has an up-to-date value before proceeding. + */ + public java.lang.String getEtag() { + return etag; + } + + /** + * Optional. This checksum is computed by the server based on the value of other fields, + * and may be sent on update and delete requests to ensure the client has an up-to-date + * value before proceeding. + */ + public Delete setEtag(java.lang.String etag) { + this.etag = etag; + return this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID so that if you + * must retry your request, the server knows to ignore the request if it has already been + * completed. The server guarantees that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the request + * times out. If you make the request again with the same request ID, the server can check + * if original operation with the same request ID was received, and if so, will ignore the + * second request. This prevents clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + @com.google.api.client.util.Key + private java.lang.String requestId; + + /** Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry + your request, the server knows to ignore the request if it has already been completed. The server + guarantees that for at least 60 minutes after the first request. For example, consider a situation + where you make an initial request and the request times out. If you make the request again with the + same request ID, the server can check if original operation with the same request ID was received, + and if so, will ignore the second request. This prevents clients from accidentally creating + duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not + supported (00000000-0000-0000-0000-000000000000). + */ + public java.lang.String getRequestId() { + return requestId; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID so that if you + * must retry your request, the server knows to ignore the request if it has already been + * completed. The server guarantees that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the request + * times out. If you make the request again with the same request ID, the server can check + * if original operation with the same request ID was received, and if so, will ignore the + * second request. This prevents clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + public Delete setRequestId(java.lang.String requestId) { + this.requestId = requestId; + return this; + } + + /** + * Optional. If set, validate the request and preview the review, but do not actually post + * it. + */ + @com.google.api.client.util.Key + private java.lang.Boolean validateOnly; + + /** Optional. If set, validate the request and preview the review, but do not actually post it. + */ + public java.lang.Boolean getValidateOnly() { + return validateOnly; + } + + /** + * Optional. If set, validate the request and preview the review, but do not actually post + * it. + */ + public Delete setValidateOnly(java.lang.Boolean validateOnly) { + this.validateOnly = validateOnly; + return this; + } + + @Override + public Delete set(String parameterName, Object value) { + return (Delete) super.set(parameterName, value); + } + } + /** + * Gets details of a single DeployPolicy. + * + * Create a request for the method "deployPolicies.get". + * + * This request holds the parameters needed by the clouddeploy server. After setting any optional + * parameters, call the {@link Get#execute()} method to invoke the remote operation. + * + * @param name Required. Name of the `DeployPolicy`. Format must be + * `projects/{project_id}/locations/{location_name}/deployPolicies/{deploy_policy_name}`. + * @return the request + */ + public Get get(java.lang.String name) throws java.io.IOException { + Get result = new Get(name); + initialize(result); + return result; + } + + public class Get extends CloudDeployRequest { + + private static final String REST_PATH = "v1/{+name}"; + + private final java.util.regex.Pattern NAME_PATTERN = + java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/deployPolicies/[^/]+$"); + + /** + * Gets details of a single DeployPolicy. + * + * Create a request for the method "deployPolicies.get". + * + * This request holds the parameters needed by the the clouddeploy server. After setting any + * optional parameters, call the {@link Get#execute()} method to invoke the remote operation.

+ * {@link Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} + * must be called to initialize this instance immediately after invoking the constructor.

+ * + * @param name Required. Name of the `DeployPolicy`. Format must be + * `projects/{project_id}/locations/{location_name}/deployPolicies/{deploy_policy_name}`. + * @since 1.13 + */ + protected Get(java.lang.String name) { + super(CloudDeploy.this, "GET", REST_PATH, null, com.google.api.services.clouddeploy.v1.model.DeployPolicy.class); + this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+/deployPolicies/[^/]+$"); + } + } + + @Override + public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { + return super.executeUsingHead(); + } + + @Override + public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { + return super.buildHttpRequestUsingHead(); + } + + @Override + public Get set$Xgafv(java.lang.String $Xgafv) { + return (Get) super.set$Xgafv($Xgafv); + } + + @Override + public Get setAccessToken(java.lang.String accessToken) { + return (Get) super.setAccessToken(accessToken); + } + + @Override + public Get setAlt(java.lang.String alt) { + return (Get) super.setAlt(alt); + } + + @Override + public Get setCallback(java.lang.String callback) { + return (Get) super.setCallback(callback); + } + + @Override + public Get setFields(java.lang.String fields) { + return (Get) super.setFields(fields); + } + + @Override + public Get setKey(java.lang.String key) { + return (Get) super.setKey(key); + } + + @Override + public Get setOauthToken(java.lang.String oauthToken) { + return (Get) super.setOauthToken(oauthToken); + } + + @Override + public Get setPrettyPrint(java.lang.Boolean prettyPrint) { + return (Get) super.setPrettyPrint(prettyPrint); + } + + @Override + public Get setQuotaUser(java.lang.String quotaUser) { + return (Get) super.setQuotaUser(quotaUser); + } + + @Override + public Get setUploadType(java.lang.String uploadType) { + return (Get) super.setUploadType(uploadType); + } + + @Override + public Get setUploadProtocol(java.lang.String uploadProtocol) { + return (Get) super.setUploadProtocol(uploadProtocol); + } + + /** + * Required. Name of the `DeployPolicy`. Format must be + * `projects/{project_id}/locations/{location_name}/deployPolicies/{deploy_policy_name}`. + */ + @com.google.api.client.util.Key + private java.lang.String name; + + /** Required. Name of the `DeployPolicy`. Format must be + `projects/{project_id}/locations/{location_name}/deployPolicies/{deploy_policy_name}`. + */ + public java.lang.String getName() { + return name; + } + + /** + * Required. Name of the `DeployPolicy`. Format must be + * `projects/{project_id}/locations/{location_name}/deployPolicies/{deploy_policy_name}`. + */ + public Get setName(java.lang.String name) { + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+/deployPolicies/[^/]+$"); + } + this.name = name; + return this; + } + + @Override + public Get set(String parameterName, Object value) { + return (Get) super.set(parameterName, value); + } + } + /** + * Lists DeployPolicies in a given project and location. + * + * Create a request for the method "deployPolicies.list". + * + * This request holds the parameters needed by the clouddeploy server. After setting any optional + * parameters, call the {@link List#execute()} method to invoke the remote operation. + * + * @param parent Required. The parent, which owns this collection of deploy policies. Format must be + * `projects/{project_id}/locations/{location_name}`. + * @return the request + */ + public List list(java.lang.String parent) throws java.io.IOException { + List result = new List(parent); + initialize(result); + return result; + } + + public class List extends CloudDeployRequest { + + private static final String REST_PATH = "v1/{+parent}/deployPolicies"; + + private final java.util.regex.Pattern PARENT_PATTERN = + java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$"); + + /** + * Lists DeployPolicies in a given project and location. + * + * Create a request for the method "deployPolicies.list". + * + * This request holds the parameters needed by the the clouddeploy server. After setting any + * optional parameters, call the {@link List#execute()} method to invoke the remote operation.

+ * {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} + * must be called to initialize this instance immediately after invoking the constructor.

+ * + * @param parent Required. The parent, which owns this collection of deploy policies. Format must be + * `projects/{project_id}/locations/{location_name}`. + * @since 1.13 + */ + protected List(java.lang.String parent) { + super(CloudDeploy.this, "GET", REST_PATH, null, com.google.api.services.clouddeploy.v1.model.ListDeployPoliciesResponse.class); + this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), + "Parameter parent must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+$"); + } + } + + @Override + public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { + return super.executeUsingHead(); + } + + @Override + public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { + return super.buildHttpRequestUsingHead(); + } + + @Override + public List set$Xgafv(java.lang.String $Xgafv) { + return (List) super.set$Xgafv($Xgafv); + } + + @Override + public List setAccessToken(java.lang.String accessToken) { + return (List) super.setAccessToken(accessToken); + } + + @Override + public List setAlt(java.lang.String alt) { + return (List) super.setAlt(alt); + } + + @Override + public List setCallback(java.lang.String callback) { + return (List) super.setCallback(callback); + } + + @Override + public List setFields(java.lang.String fields) { + return (List) super.setFields(fields); + } + + @Override + public List setKey(java.lang.String key) { + return (List) super.setKey(key); + } + + @Override + public List setOauthToken(java.lang.String oauthToken) { + return (List) super.setOauthToken(oauthToken); + } + + @Override + public List setPrettyPrint(java.lang.Boolean prettyPrint) { + return (List) super.setPrettyPrint(prettyPrint); + } + + @Override + public List setQuotaUser(java.lang.String quotaUser) { + return (List) super.setQuotaUser(quotaUser); + } + + @Override + public List setUploadType(java.lang.String uploadType) { + return (List) super.setUploadType(uploadType); + } + + @Override + public List setUploadProtocol(java.lang.String uploadProtocol) { + return (List) super.setUploadProtocol(uploadProtocol); + } + + /** + * Required. The parent, which owns this collection of deploy policies. Format must be + * `projects/{project_id}/locations/{location_name}`. + */ + @com.google.api.client.util.Key + private java.lang.String parent; + + /** Required. The parent, which owns this collection of deploy policies. Format must be + `projects/{project_id}/locations/{location_name}`. + */ + public java.lang.String getParent() { + return parent; + } + + /** + * Required. The parent, which owns this collection of deploy policies. Format must be + * `projects/{project_id}/locations/{location_name}`. + */ + public List setParent(java.lang.String parent) { + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), + "Parameter parent must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+$"); + } + this.parent = parent; + return this; + } + + /** + * Filter deploy policies to be returned. See https://google.aip.dev/160 for more details. + * All fields can be used in the filter. + */ + @com.google.api.client.util.Key + private java.lang.String filter; + + /** Filter deploy policies to be returned. See https://google.aip.dev/160 for more details. All fields + can be used in the filter. + */ + public java.lang.String getFilter() { + return filter; + } + + /** + * Filter deploy policies to be returned. See https://google.aip.dev/160 for more details. + * All fields can be used in the filter. + */ + public List setFilter(java.lang.String filter) { + this.filter = filter; + return this; + } + + /** Field to sort by. See https://google.aip.dev/132#ordering for more details. */ + @com.google.api.client.util.Key + private java.lang.String orderBy; + + /** Field to sort by. See https://google.aip.dev/132#ordering for more details. + */ + public java.lang.String getOrderBy() { + return orderBy; + } + + /** Field to sort by. See https://google.aip.dev/132#ordering for more details. */ + public List setOrderBy(java.lang.String orderBy) { + this.orderBy = orderBy; + return this; + } + + /** + * The maximum number of deploy policies to return. The service may return fewer than this + * value. If unspecified, at most 50 deploy policies will be returned. The maximum value + * is 1000; values above 1000 will be set to 1000. + */ + @com.google.api.client.util.Key + private java.lang.Integer pageSize; + + /** The maximum number of deploy policies to return. The service may return fewer than this value. If + unspecified, at most 50 deploy policies will be returned. The maximum value is 1000; values above + 1000 will be set to 1000. + */ + public java.lang.Integer getPageSize() { + return pageSize; + } + + /** + * The maximum number of deploy policies to return. The service may return fewer than this + * value. If unspecified, at most 50 deploy policies will be returned. The maximum value + * is 1000; values above 1000 will be set to 1000. + */ + public List setPageSize(java.lang.Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * A page token, received from a previous `ListDeployPolicies` call. Provide this to + * retrieve the subsequent page. When paginating, all other provided parameters match the + * call that provided the page token. + */ + @com.google.api.client.util.Key + private java.lang.String pageToken; + + /** A page token, received from a previous `ListDeployPolicies` call. Provide this to retrieve the + subsequent page. When paginating, all other provided parameters match the call that provided the + page token. + */ + public java.lang.String getPageToken() { + return pageToken; + } + + /** + * A page token, received from a previous `ListDeployPolicies` call. Provide this to + * retrieve the subsequent page. When paginating, all other provided parameters match the + * call that provided the page token. + */ + public List setPageToken(java.lang.String pageToken) { + this.pageToken = pageToken; + return this; + } + + @Override + public List set(String parameterName, Object value) { + return (List) super.set(parameterName, value); + } + } + /** + * Updates the parameters of a single DeployPolicy. + * + * Create a request for the method "deployPolicies.patch". + * + * This request holds the parameters needed by the clouddeploy server. After setting any optional + * parameters, call the {@link Patch#execute()} method to invoke the remote operation. + * + * @param name Output only. Name of the `DeployPolicy`. Format is + * `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`. The + * `deployPolicy` component must match `[a-z]([a-z0-9-]{0,61}[a-z0-9])?` + * @param content the {@link com.google.api.services.clouddeploy.v1.model.DeployPolicy} + * @return the request + */ + public Patch patch(java.lang.String name, com.google.api.services.clouddeploy.v1.model.DeployPolicy content) throws java.io.IOException { + Patch result = new Patch(name, content); + initialize(result); + return result; + } + + public class Patch extends CloudDeployRequest { + + private static final String REST_PATH = "v1/{+name}"; + + private final java.util.regex.Pattern NAME_PATTERN = + java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/deployPolicies/[^/]+$"); + + /** + * Updates the parameters of a single DeployPolicy. + * + * Create a request for the method "deployPolicies.patch". + * + * This request holds the parameters needed by the the clouddeploy server. After setting any + * optional parameters, call the {@link Patch#execute()} method to invoke the remote operation. + *

{@link + * Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must + * be called to initialize this instance immediately after invoking the constructor.

+ * + * @param name Output only. Name of the `DeployPolicy`. Format is + * `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`. The + * `deployPolicy` component must match `[a-z]([a-z0-9-]{0,61}[a-z0-9])?` + * @param content the {@link com.google.api.services.clouddeploy.v1.model.DeployPolicy} + * @since 1.13 + */ + protected Patch(java.lang.String name, com.google.api.services.clouddeploy.v1.model.DeployPolicy content) { + super(CloudDeploy.this, "PATCH", REST_PATH, content, com.google.api.services.clouddeploy.v1.model.Operation.class); + this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+/deployPolicies/[^/]+$"); + } + } + + @Override + public Patch set$Xgafv(java.lang.String $Xgafv) { + return (Patch) super.set$Xgafv($Xgafv); + } + + @Override + public Patch setAccessToken(java.lang.String accessToken) { + return (Patch) super.setAccessToken(accessToken); + } + + @Override + public Patch setAlt(java.lang.String alt) { + return (Patch) super.setAlt(alt); + } + + @Override + public Patch setCallback(java.lang.String callback) { + return (Patch) super.setCallback(callback); + } + + @Override + public Patch setFields(java.lang.String fields) { + return (Patch) super.setFields(fields); + } + + @Override + public Patch setKey(java.lang.String key) { + return (Patch) super.setKey(key); + } + + @Override + public Patch setOauthToken(java.lang.String oauthToken) { + return (Patch) super.setOauthToken(oauthToken); + } + + @Override + public Patch setPrettyPrint(java.lang.Boolean prettyPrint) { + return (Patch) super.setPrettyPrint(prettyPrint); + } + + @Override + public Patch setQuotaUser(java.lang.String quotaUser) { + return (Patch) super.setQuotaUser(quotaUser); + } + + @Override + public Patch setUploadType(java.lang.String uploadType) { + return (Patch) super.setUploadType(uploadType); + } + + @Override + public Patch setUploadProtocol(java.lang.String uploadProtocol) { + return (Patch) super.setUploadProtocol(uploadProtocol); + } + + /** + * Output only. Name of the `DeployPolicy`. Format is + * `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`. The + * `deployPolicy` component must match `[a-z]([a-z0-9-]{0,61}[a-z0-9])?` + */ + @com.google.api.client.util.Key + private java.lang.String name; + + /** Output only. Name of the `DeployPolicy`. Format is + `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`. The `deployPolicy` + component must match `[a-z]([a-z0-9-]{0,61}[a-z0-9])?` + */ + public java.lang.String getName() { + return name; + } + + /** + * Output only. Name of the `DeployPolicy`. Format is + * `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`. The + * `deployPolicy` component must match `[a-z]([a-z0-9-]{0,61}[a-z0-9])?` + */ + public Patch setName(java.lang.String name) { + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+/deployPolicies/[^/]+$"); + } + this.name = name; + return this; + } + + /** + * Optional. If set to true, updating a `DeployPolicy` that does not exist will result in + * the creation of a new `DeployPolicy`. + */ + @com.google.api.client.util.Key + private java.lang.Boolean allowMissing; + + /** Optional. If set to true, updating a `DeployPolicy` that does not exist will result in the creation + of a new `DeployPolicy`. + */ + public java.lang.Boolean getAllowMissing() { + return allowMissing; + } + + /** + * Optional. If set to true, updating a `DeployPolicy` that does not exist will result in + * the creation of a new `DeployPolicy`. + */ + public Patch setAllowMissing(java.lang.Boolean allowMissing) { + this.allowMissing = allowMissing; + return this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID so that if you + * must retry your request, the server knows to ignore the request if it has already been + * completed. The server guarantees that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the request + * times out. If you make the request again with the same request ID, the server can check + * if original operation with the same request ID was received, and if so, will ignore the + * second request. This prevents clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + @com.google.api.client.util.Key + private java.lang.String requestId; + + /** Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry + your request, the server knows to ignore the request if it has already been completed. The server + guarantees that for at least 60 minutes after the first request. For example, consider a situation + where you make an initial request and the request times out. If you make the request again with the + same request ID, the server can check if original operation with the same request ID was received, + and if so, will ignore the second request. This prevents clients from accidentally creating + duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not + supported (00000000-0000-0000-0000-000000000000). + */ + public java.lang.String getRequestId() { + return requestId; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID so that if you + * must retry your request, the server knows to ignore the request if it has already been + * completed. The server guarantees that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the request + * times out. If you make the request again with the same request ID, the server can check + * if original operation with the same request ID was received, and if so, will ignore the + * second request. This prevents clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + public Patch setRequestId(java.lang.String requestId) { + this.requestId = requestId; + return this; + } + + /** + * Required. Field mask is used to specify the fields to be overwritten by the update in + * the `DeployPolicy` resource. The fields specified in the update_mask are relative to + * the resource, not the full request. A field will be overwritten if it's in the mask. If + * the user doesn't provide a mask then all fields are overwritten. + */ + @com.google.api.client.util.Key + private String updateMask; + + /** Required. Field mask is used to specify the fields to be overwritten by the update in the + `DeployPolicy` resource. The fields specified in the update_mask are relative to the resource, not + the full request. A field will be overwritten if it's in the mask. If the user doesn't provide a + mask then all fields are overwritten. + */ + public String getUpdateMask() { + return updateMask; + } + + /** + * Required. Field mask is used to specify the fields to be overwritten by the update in + * the `DeployPolicy` resource. The fields specified in the update_mask are relative to + * the resource, not the full request. A field will be overwritten if it's in the mask. If + * the user doesn't provide a mask then all fields are overwritten. + */ + public Patch setUpdateMask(String updateMask) { + this.updateMask = updateMask; + return this; + } + + /** + * Optional. If set to true, the request is validated and the user is provided with an + * expected result, but no actual change is made. + */ + @com.google.api.client.util.Key + private java.lang.Boolean validateOnly; + + /** Optional. If set to true, the request is validated and the user is provided with an expected + result, but no actual change is made. + */ + public java.lang.Boolean getValidateOnly() { + return validateOnly; + } + + /** + * Optional. If set to true, the request is validated and the user is provided with an + * expected result, but no actual change is made. + */ + public Patch setValidateOnly(java.lang.Boolean validateOnly) { + this.validateOnly = validateOnly; + return this; + } + + @Override + public Patch set(String parameterName, Object value) { + return (Patch) super.set(parameterName, value); + } + } + + } /** * An accessor for creating requests from the Operations collection. * diff --git a/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/AdvanceRolloutRequest.java b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/AdvanceRolloutRequest.java index 42e960ea1b6..8d912c6a040 100644 --- a/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/AdvanceRolloutRequest.java +++ b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/AdvanceRolloutRequest.java @@ -29,6 +29,14 @@ @SuppressWarnings("javadoc") public final class AdvanceRolloutRequest extends com.google.api.client.json.GenericJson { + /** + * Optional. Deploy policies to override. Format is + * `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List overrideDeployPolicy; + /** * Required. The phase ID to advance the `Rollout` to. * The value may be {@code null}. @@ -36,6 +44,25 @@ public final class AdvanceRolloutRequest extends com.google.api.client.json.Gene @com.google.api.client.util.Key private java.lang.String phaseId; + /** + * Optional. Deploy policies to override. Format is + * `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`. + * @return value or {@code null} for none + */ + public java.util.List getOverrideDeployPolicy() { + return overrideDeployPolicy; + } + + /** + * Optional. Deploy policies to override. Format is + * `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`. + * @param overrideDeployPolicy overrideDeployPolicy or {@code null} for none + */ + public AdvanceRolloutRequest setOverrideDeployPolicy(java.util.List overrideDeployPolicy) { + this.overrideDeployPolicy = overrideDeployPolicy; + return this; + } + /** * Required. The phase ID to advance the `Rollout` to. * @return value or {@code null} for none diff --git a/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/ApproveRolloutRequest.java b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/ApproveRolloutRequest.java index 2b284dfee11..11b7a9310e7 100644 --- a/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/ApproveRolloutRequest.java +++ b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/ApproveRolloutRequest.java @@ -36,6 +36,14 @@ public final class ApproveRolloutRequest extends com.google.api.client.json.Gene @com.google.api.client.util.Key private java.lang.Boolean approved; + /** + * Optional. Deploy policies to override. Format is + * `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List overrideDeployPolicy; + /** * Required. True = approve; false = reject * @return value or {@code null} for none @@ -53,6 +61,25 @@ public ApproveRolloutRequest setApproved(java.lang.Boolean approved) { return this; } + /** + * Optional. Deploy policies to override. Format is + * `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`. + * @return value or {@code null} for none + */ + public java.util.List getOverrideDeployPolicy() { + return overrideDeployPolicy; + } + + /** + * Optional. Deploy policies to override. Format is + * `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`. + * @param overrideDeployPolicy overrideDeployPolicy or {@code null} for none + */ + public ApproveRolloutRequest setOverrideDeployPolicy(java.util.List overrideDeployPolicy) { + this.overrideDeployPolicy = overrideDeployPolicy; + return this; + } + @Override public ApproveRolloutRequest set(String fieldName, Object value) { return (ApproveRolloutRequest) super.set(fieldName, value); diff --git a/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/AutomationRun.java b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/AutomationRun.java index b5119fd2801..01280e4b6f8 100644 --- a/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/AutomationRun.java +++ b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/AutomationRun.java @@ -83,6 +83,13 @@ public final class AutomationRun extends com.google.api.client.json.GenericJson @com.google.api.client.util.Key private java.lang.String name; + /** + * Output only. Contains information about what policies prevented the `AutomationRun` to proceed. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private PolicyViolation policyViolation; + /** * Output only. Promotes a release to a specified 'Target'. * The value may be {@code null}. @@ -277,6 +284,23 @@ public AutomationRun setName(java.lang.String name) { return this; } + /** + * Output only. Contains information about what policies prevented the `AutomationRun` to proceed. + * @return value or {@code null} for none + */ + public PolicyViolation getPolicyViolation() { + return policyViolation; + } + + /** + * Output only. Contains information about what policies prevented the `AutomationRun` to proceed. + * @param policyViolation policyViolation or {@code null} for none + */ + public AutomationRun setPolicyViolation(PolicyViolation policyViolation) { + this.policyViolation = policyViolation; + return this; + } + /** * Output only. Promotes a release to a specified 'Target'. * @return value or {@code null} for none diff --git a/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/CancelRolloutRequest.java b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/CancelRolloutRequest.java index 0a41c391dd5..375c4309cf9 100644 --- a/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/CancelRolloutRequest.java +++ b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/CancelRolloutRequest.java @@ -29,6 +29,33 @@ @SuppressWarnings("javadoc") public final class CancelRolloutRequest extends com.google.api.client.json.GenericJson { + /** + * Optional. Deploy policies to override. Format is + * `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List overrideDeployPolicy; + + /** + * Optional. Deploy policies to override. Format is + * `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`. + * @return value or {@code null} for none + */ + public java.util.List getOverrideDeployPolicy() { + return overrideDeployPolicy; + } + + /** + * Optional. Deploy policies to override. Format is + * `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`. + * @param overrideDeployPolicy overrideDeployPolicy or {@code null} for none + */ + public CancelRolloutRequest setOverrideDeployPolicy(java.util.List overrideDeployPolicy) { + this.overrideDeployPolicy = overrideDeployPolicy; + return this; + } + @Override public CancelRolloutRequest set(String fieldName, Object value) { return (CancelRolloutRequest) super.set(fieldName, value); diff --git a/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/DeliveryPipelineAttribute.java b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/DeliveryPipelineAttribute.java new file mode 100644 index 00000000000..2b8c0617bad --- /dev/null +++ b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/DeliveryPipelineAttribute.java @@ -0,0 +1,93 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.clouddeploy.v1.model; + +/** + * Contains criteria for selecting DeliveryPipelines. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Cloud Deploy API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class DeliveryPipelineAttribute extends com.google.api.client.json.GenericJson { + + /** + * ID of the `DeliveryPipeline`. The value of this field could be one of the following: * The last + * segment of a pipeline name * "*", all delivery pipelines in a location + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String id; + + /** + * DeliveryPipeline labels. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.Map labels; + + /** + * ID of the `DeliveryPipeline`. The value of this field could be one of the following: * The last + * segment of a pipeline name * "*", all delivery pipelines in a location + * @return value or {@code null} for none + */ + public java.lang.String getId() { + return id; + } + + /** + * ID of the `DeliveryPipeline`. The value of this field could be one of the following: * The last + * segment of a pipeline name * "*", all delivery pipelines in a location + * @param id id or {@code null} for none + */ + public DeliveryPipelineAttribute setId(java.lang.String id) { + this.id = id; + return this; + } + + /** + * DeliveryPipeline labels. + * @return value or {@code null} for none + */ + public java.util.Map getLabels() { + return labels; + } + + /** + * DeliveryPipeline labels. + * @param labels labels or {@code null} for none + */ + public DeliveryPipelineAttribute setLabels(java.util.Map labels) { + this.labels = labels; + return this; + } + + @Override + public DeliveryPipelineAttribute set(String fieldName, Object value) { + return (DeliveryPipelineAttribute) super.set(fieldName, value); + } + + @Override + public DeliveryPipelineAttribute clone() { + return (DeliveryPipelineAttribute) super.clone(); + } + +} diff --git a/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/DeployPolicy.java b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/DeployPolicy.java new file mode 100644 index 00000000000..da0873ca665 --- /dev/null +++ b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/DeployPolicy.java @@ -0,0 +1,370 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.clouddeploy.v1.model; + +/** + * A `DeployPolicy` resource in the Cloud Deploy API. A `DeployPolicy` inhibits manual or automation + * driven actions within a Delivery Pipeline or Target. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Cloud Deploy API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class DeployPolicy extends com.google.api.client.json.GenericJson { + + /** + * User annotations. These attributes can only be set and used by the user, and not by Cloud + * Deploy. Annotations must meet the following constraints: * Annotations are key/value pairs. * + * Valid annotation keys have two segments: an optional prefix and name, separated by a slash + * (`/`). * The name segment is required and must be 63 characters or less, beginning and ending + * with an alphanumeric character (`[a-z0-9A-Z]`) with dashes (`-`), underscores (`_`), dots + * (`.`), and alphanumerics between. * The prefix is optional. If specified, the prefix must be a + * DNS subdomain: a series of DNS labels separated by dots(`.`), not longer than 253 characters in + * total, followed by a slash (`/`). See https://kubernetes.io/docs/concepts/overview/working- + * with-objects/annotations/#syntax-and-character-set for more details. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.Map annotations; + + /** + * Output only. Time at which the deploy policy was created. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private String createTime; + + /** + * Description of the `DeployPolicy`. Max length is 255 characters. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String description; + + /** + * The weak etag of the `Automation` resource. This checksum is computed by the server based on + * the value of other fields, and may be sent on update and delete requests to ensure the client + * has an up-to-date value before proceeding. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String etag; + + /** + * Labels are attributes that can be set and used by both the user and by Cloud Deploy. Labels + * must meet the following constraints: * Keys and values can contain only lowercase letters, + * numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and + * international characters are allowed. * Keys must start with a lowercase letter or + * international character. * Each resource is limited to a maximum of 64 labels. Both keys and + * values are additionally constrained to be <= 128 bytes. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.Map labels; + + /** + * Output only. Name of the `DeployPolicy`. Format is + * `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`. The `deployPolicy` + * component must match `[a-z]([a-z0-9-]{0,61}[a-z0-9])?` + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String name; + + /** + * Required. Rules to apply. At least one rule must be present. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List rules; + + /** + * Required. Selected resources to which the policy will be applied. At least one selector is + * required. If one selector matches the resource the policy applies. For example, if there are + * two selectors and the action being attempted matches one of them, the policy will apply to that + * action. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List selectors; + + /** + * When suspended, the policy will not prevent actions from occurring, even if the action violates + * the policy. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.Boolean suspended; + + /** + * Output only. Unique identifier of the `DeployPolicy`. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String uid; + + /** + * Output only. Most recent time at which the deploy policy was updated. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private String updateTime; + + /** + * User annotations. These attributes can only be set and used by the user, and not by Cloud + * Deploy. Annotations must meet the following constraints: * Annotations are key/value pairs. * + * Valid annotation keys have two segments: an optional prefix and name, separated by a slash + * (`/`). * The name segment is required and must be 63 characters or less, beginning and ending + * with an alphanumeric character (`[a-z0-9A-Z]`) with dashes (`-`), underscores (`_`), dots + * (`.`), and alphanumerics between. * The prefix is optional. If specified, the prefix must be a + * DNS subdomain: a series of DNS labels separated by dots(`.`), not longer than 253 characters in + * total, followed by a slash (`/`). See https://kubernetes.io/docs/concepts/overview/working- + * with-objects/annotations/#syntax-and-character-set for more details. + * @return value or {@code null} for none + */ + public java.util.Map getAnnotations() { + return annotations; + } + + /** + * User annotations. These attributes can only be set and used by the user, and not by Cloud + * Deploy. Annotations must meet the following constraints: * Annotations are key/value pairs. * + * Valid annotation keys have two segments: an optional prefix and name, separated by a slash + * (`/`). * The name segment is required and must be 63 characters or less, beginning and ending + * with an alphanumeric character (`[a-z0-9A-Z]`) with dashes (`-`), underscores (`_`), dots + * (`.`), and alphanumerics between. * The prefix is optional. If specified, the prefix must be a + * DNS subdomain: a series of DNS labels separated by dots(`.`), not longer than 253 characters in + * total, followed by a slash (`/`). See https://kubernetes.io/docs/concepts/overview/working- + * with-objects/annotations/#syntax-and-character-set for more details. + * @param annotations annotations or {@code null} for none + */ + public DeployPolicy setAnnotations(java.util.Map annotations) { + this.annotations = annotations; + return this; + } + + /** + * Output only. Time at which the deploy policy was created. + * @return value or {@code null} for none + */ + public String getCreateTime() { + return createTime; + } + + /** + * Output only. Time at which the deploy policy was created. + * @param createTime createTime or {@code null} for none + */ + public DeployPolicy setCreateTime(String createTime) { + this.createTime = createTime; + return this; + } + + /** + * Description of the `DeployPolicy`. Max length is 255 characters. + * @return value or {@code null} for none + */ + public java.lang.String getDescription() { + return description; + } + + /** + * Description of the `DeployPolicy`. Max length is 255 characters. + * @param description description or {@code null} for none + */ + public DeployPolicy setDescription(java.lang.String description) { + this.description = description; + return this; + } + + /** + * The weak etag of the `Automation` resource. This checksum is computed by the server based on + * the value of other fields, and may be sent on update and delete requests to ensure the client + * has an up-to-date value before proceeding. + * @return value or {@code null} for none + */ + public java.lang.String getEtag() { + return etag; + } + + /** + * The weak etag of the `Automation` resource. This checksum is computed by the server based on + * the value of other fields, and may be sent on update and delete requests to ensure the client + * has an up-to-date value before proceeding. + * @param etag etag or {@code null} for none + */ + public DeployPolicy setEtag(java.lang.String etag) { + this.etag = etag; + return this; + } + + /** + * Labels are attributes that can be set and used by both the user and by Cloud Deploy. Labels + * must meet the following constraints: * Keys and values can contain only lowercase letters, + * numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and + * international characters are allowed. * Keys must start with a lowercase letter or + * international character. * Each resource is limited to a maximum of 64 labels. Both keys and + * values are additionally constrained to be <= 128 bytes. + * @return value or {@code null} for none + */ + public java.util.Map getLabels() { + return labels; + } + + /** + * Labels are attributes that can be set and used by both the user and by Cloud Deploy. Labels + * must meet the following constraints: * Keys and values can contain only lowercase letters, + * numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and + * international characters are allowed. * Keys must start with a lowercase letter or + * international character. * Each resource is limited to a maximum of 64 labels. Both keys and + * values are additionally constrained to be <= 128 bytes. + * @param labels labels or {@code null} for none + */ + public DeployPolicy setLabels(java.util.Map labels) { + this.labels = labels; + return this; + } + + /** + * Output only. Name of the `DeployPolicy`. Format is + * `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`. The `deployPolicy` + * component must match `[a-z]([a-z0-9-]{0,61}[a-z0-9])?` + * @return value or {@code null} for none + */ + public java.lang.String getName() { + return name; + } + + /** + * Output only. Name of the `DeployPolicy`. Format is + * `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`. The `deployPolicy` + * component must match `[a-z]([a-z0-9-]{0,61}[a-z0-9])?` + * @param name name or {@code null} for none + */ + public DeployPolicy setName(java.lang.String name) { + this.name = name; + return this; + } + + /** + * Required. Rules to apply. At least one rule must be present. + * @return value or {@code null} for none + */ + public java.util.List getRules() { + return rules; + } + + /** + * Required. Rules to apply. At least one rule must be present. + * @param rules rules or {@code null} for none + */ + public DeployPolicy setRules(java.util.List rules) { + this.rules = rules; + return this; + } + + /** + * Required. Selected resources to which the policy will be applied. At least one selector is + * required. If one selector matches the resource the policy applies. For example, if there are + * two selectors and the action being attempted matches one of them, the policy will apply to that + * action. + * @return value or {@code null} for none + */ + public java.util.List getSelectors() { + return selectors; + } + + /** + * Required. Selected resources to which the policy will be applied. At least one selector is + * required. If one selector matches the resource the policy applies. For example, if there are + * two selectors and the action being attempted matches one of them, the policy will apply to that + * action. + * @param selectors selectors or {@code null} for none + */ + public DeployPolicy setSelectors(java.util.List selectors) { + this.selectors = selectors; + return this; + } + + /** + * When suspended, the policy will not prevent actions from occurring, even if the action violates + * the policy. + * @return value or {@code null} for none + */ + public java.lang.Boolean getSuspended() { + return suspended; + } + + /** + * When suspended, the policy will not prevent actions from occurring, even if the action violates + * the policy. + * @param suspended suspended or {@code null} for none + */ + public DeployPolicy setSuspended(java.lang.Boolean suspended) { + this.suspended = suspended; + return this; + } + + /** + * Output only. Unique identifier of the `DeployPolicy`. + * @return value or {@code null} for none + */ + public java.lang.String getUid() { + return uid; + } + + /** + * Output only. Unique identifier of the `DeployPolicy`. + * @param uid uid or {@code null} for none + */ + public DeployPolicy setUid(java.lang.String uid) { + this.uid = uid; + return this; + } + + /** + * Output only. Most recent time at which the deploy policy was updated. + * @return value or {@code null} for none + */ + public String getUpdateTime() { + return updateTime; + } + + /** + * Output only. Most recent time at which the deploy policy was updated. + * @param updateTime updateTime or {@code null} for none + */ + public DeployPolicy setUpdateTime(String updateTime) { + this.updateTime = updateTime; + return this; + } + + @Override + public DeployPolicy set(String fieldName, Object value) { + return (DeployPolicy) super.set(fieldName, value); + } + + @Override + public DeployPolicy clone() { + return (DeployPolicy) super.clone(); + } + +} diff --git a/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/DeployPolicyEvaluationEvent.java b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/DeployPolicyEvaluationEvent.java new file mode 100644 index 00000000000..aaa9000341a --- /dev/null +++ b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/DeployPolicyEvaluationEvent.java @@ -0,0 +1,370 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.clouddeploy.v1.model; + +/** + * Payload proto for "clouddeploy.googleapis.com/deploypolicy_evaluation" Platform Log event that + * describes the deploy policy evaluation event. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Cloud Deploy API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class DeployPolicyEvaluationEvent extends com.google.api.client.json.GenericJson { + + /** + * Whether the request is allowed. Allowed is set as true if: (1) the request complies with the + * policy; or (2) the request doesn't comply with the policy but the policy was overridden; or (3) + * the request doesn't comply with the policy but the policy was suspended + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.Boolean allowed; + + /** + * The name of the `Delivery Pipeline`. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String deliveryPipeline; + + /** + * The name of the `DeployPolicy`. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String deployPolicy; + + /** + * Unique identifier of the `DeployPolicy`. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String deployPolicyUid; + + /** + * What invoked the action (e.g. a user or automation). + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String invoker; + + /** + * Debug message for when a deploy policy event occurs. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String message; + + /** + * Things that could have overridden the policy verdict. Overrides together with verdict decide + * whether the request is allowed. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List overrides; + + /** + * Unique identifier of the `Delivery Pipeline`. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String pipelineUid; + + /** + * Rule id. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String rule; + + /** + * Rule type (e.g. Restrict Rollouts). + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String ruleType; + + /** + * The name of the `Target`. This is an optional field, as a `Target` may not always be applicable + * to a policy. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String target; + + /** + * Unique identifier of the `Target`. This is an optional field, as a `Target` may not always be + * applicable to a policy. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String targetUid; + + /** + * The policy verdict of the request. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String verdict; + + /** + * Whether the request is allowed. Allowed is set as true if: (1) the request complies with the + * policy; or (2) the request doesn't comply with the policy but the policy was overridden; or (3) + * the request doesn't comply with the policy but the policy was suspended + * @return value or {@code null} for none + */ + public java.lang.Boolean getAllowed() { + return allowed; + } + + /** + * Whether the request is allowed. Allowed is set as true if: (1) the request complies with the + * policy; or (2) the request doesn't comply with the policy but the policy was overridden; or (3) + * the request doesn't comply with the policy but the policy was suspended + * @param allowed allowed or {@code null} for none + */ + public DeployPolicyEvaluationEvent setAllowed(java.lang.Boolean allowed) { + this.allowed = allowed; + return this; + } + + /** + * The name of the `Delivery Pipeline`. + * @return value or {@code null} for none + */ + public java.lang.String getDeliveryPipeline() { + return deliveryPipeline; + } + + /** + * The name of the `Delivery Pipeline`. + * @param deliveryPipeline deliveryPipeline or {@code null} for none + */ + public DeployPolicyEvaluationEvent setDeliveryPipeline(java.lang.String deliveryPipeline) { + this.deliveryPipeline = deliveryPipeline; + return this; + } + + /** + * The name of the `DeployPolicy`. + * @return value or {@code null} for none + */ + public java.lang.String getDeployPolicy() { + return deployPolicy; + } + + /** + * The name of the `DeployPolicy`. + * @param deployPolicy deployPolicy or {@code null} for none + */ + public DeployPolicyEvaluationEvent setDeployPolicy(java.lang.String deployPolicy) { + this.deployPolicy = deployPolicy; + return this; + } + + /** + * Unique identifier of the `DeployPolicy`. + * @return value or {@code null} for none + */ + public java.lang.String getDeployPolicyUid() { + return deployPolicyUid; + } + + /** + * Unique identifier of the `DeployPolicy`. + * @param deployPolicyUid deployPolicyUid or {@code null} for none + */ + public DeployPolicyEvaluationEvent setDeployPolicyUid(java.lang.String deployPolicyUid) { + this.deployPolicyUid = deployPolicyUid; + return this; + } + + /** + * What invoked the action (e.g. a user or automation). + * @return value or {@code null} for none + */ + public java.lang.String getInvoker() { + return invoker; + } + + /** + * What invoked the action (e.g. a user or automation). + * @param invoker invoker or {@code null} for none + */ + public DeployPolicyEvaluationEvent setInvoker(java.lang.String invoker) { + this.invoker = invoker; + return this; + } + + /** + * Debug message for when a deploy policy event occurs. + * @return value or {@code null} for none + */ + public java.lang.String getMessage() { + return message; + } + + /** + * Debug message for when a deploy policy event occurs. + * @param message message or {@code null} for none + */ + public DeployPolicyEvaluationEvent setMessage(java.lang.String message) { + this.message = message; + return this; + } + + /** + * Things that could have overridden the policy verdict. Overrides together with verdict decide + * whether the request is allowed. + * @return value or {@code null} for none + */ + public java.util.List getOverrides() { + return overrides; + } + + /** + * Things that could have overridden the policy verdict. Overrides together with verdict decide + * whether the request is allowed. + * @param overrides overrides or {@code null} for none + */ + public DeployPolicyEvaluationEvent setOverrides(java.util.List overrides) { + this.overrides = overrides; + return this; + } + + /** + * Unique identifier of the `Delivery Pipeline`. + * @return value or {@code null} for none + */ + public java.lang.String getPipelineUid() { + return pipelineUid; + } + + /** + * Unique identifier of the `Delivery Pipeline`. + * @param pipelineUid pipelineUid or {@code null} for none + */ + public DeployPolicyEvaluationEvent setPipelineUid(java.lang.String pipelineUid) { + this.pipelineUid = pipelineUid; + return this; + } + + /** + * Rule id. + * @return value or {@code null} for none + */ + public java.lang.String getRule() { + return rule; + } + + /** + * Rule id. + * @param rule rule or {@code null} for none + */ + public DeployPolicyEvaluationEvent setRule(java.lang.String rule) { + this.rule = rule; + return this; + } + + /** + * Rule type (e.g. Restrict Rollouts). + * @return value or {@code null} for none + */ + public java.lang.String getRuleType() { + return ruleType; + } + + /** + * Rule type (e.g. Restrict Rollouts). + * @param ruleType ruleType or {@code null} for none + */ + public DeployPolicyEvaluationEvent setRuleType(java.lang.String ruleType) { + this.ruleType = ruleType; + return this; + } + + /** + * The name of the `Target`. This is an optional field, as a `Target` may not always be applicable + * to a policy. + * @return value or {@code null} for none + */ + public java.lang.String getTarget() { + return target; + } + + /** + * The name of the `Target`. This is an optional field, as a `Target` may not always be applicable + * to a policy. + * @param target target or {@code null} for none + */ + public DeployPolicyEvaluationEvent setTarget(java.lang.String target) { + this.target = target; + return this; + } + + /** + * Unique identifier of the `Target`. This is an optional field, as a `Target` may not always be + * applicable to a policy. + * @return value or {@code null} for none + */ + public java.lang.String getTargetUid() { + return targetUid; + } + + /** + * Unique identifier of the `Target`. This is an optional field, as a `Target` may not always be + * applicable to a policy. + * @param targetUid targetUid or {@code null} for none + */ + public DeployPolicyEvaluationEvent setTargetUid(java.lang.String targetUid) { + this.targetUid = targetUid; + return this; + } + + /** + * The policy verdict of the request. + * @return value or {@code null} for none + */ + public java.lang.String getVerdict() { + return verdict; + } + + /** + * The policy verdict of the request. + * @param verdict verdict or {@code null} for none + */ + public DeployPolicyEvaluationEvent setVerdict(java.lang.String verdict) { + this.verdict = verdict; + return this; + } + + @Override + public DeployPolicyEvaluationEvent set(String fieldName, Object value) { + return (DeployPolicyEvaluationEvent) super.set(fieldName, value); + } + + @Override + public DeployPolicyEvaluationEvent clone() { + return (DeployPolicyEvaluationEvent) super.clone(); + } + +} diff --git a/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/DeployPolicyResourceSelector.java b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/DeployPolicyResourceSelector.java new file mode 100644 index 00000000000..9e362f45aa5 --- /dev/null +++ b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/DeployPolicyResourceSelector.java @@ -0,0 +1,93 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.clouddeploy.v1.model; + +/** + * Contains information on the resources to select for a deploy policy. Attributes provided must all + * match the resource in order for policy restrictions to apply. For example, if delivery pipelines + * attributes given are an id "prod" and labels "foo: bar", a delivery pipeline resource must match + * both that id and have that label in order to be subject to the policy. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Cloud Deploy API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class DeployPolicyResourceSelector extends com.google.api.client.json.GenericJson { + + /** + * Optional. Contains attributes about a delivery pipeline. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private DeliveryPipelineAttribute deliveryPipeline; + + /** + * Optional. Contains attributes about a target. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private TargetAttribute target; + + /** + * Optional. Contains attributes about a delivery pipeline. + * @return value or {@code null} for none + */ + public DeliveryPipelineAttribute getDeliveryPipeline() { + return deliveryPipeline; + } + + /** + * Optional. Contains attributes about a delivery pipeline. + * @param deliveryPipeline deliveryPipeline or {@code null} for none + */ + public DeployPolicyResourceSelector setDeliveryPipeline(DeliveryPipelineAttribute deliveryPipeline) { + this.deliveryPipeline = deliveryPipeline; + return this; + } + + /** + * Optional. Contains attributes about a target. + * @return value or {@code null} for none + */ + public TargetAttribute getTarget() { + return target; + } + + /** + * Optional. Contains attributes about a target. + * @param target target or {@code null} for none + */ + public DeployPolicyResourceSelector setTarget(TargetAttribute target) { + this.target = target; + return this; + } + + @Override + public DeployPolicyResourceSelector set(String fieldName, Object value) { + return (DeployPolicyResourceSelector) super.set(fieldName, value); + } + + @Override + public DeployPolicyResourceSelector clone() { + return (DeployPolicyResourceSelector) super.clone(); + } + +} diff --git a/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/IgnoreJobRequest.java b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/IgnoreJobRequest.java index b0fd426ce86..7d4fa78a3eb 100644 --- a/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/IgnoreJobRequest.java +++ b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/IgnoreJobRequest.java @@ -36,6 +36,14 @@ public final class IgnoreJobRequest extends com.google.api.client.json.GenericJs @com.google.api.client.util.Key private java.lang.String jobId; + /** + * Optional. Deploy policies to override. Format is + * `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List overrideDeployPolicy; + /** * Required. The phase ID the Job to ignore belongs to. * The value may be {@code null}. @@ -60,6 +68,25 @@ public IgnoreJobRequest setJobId(java.lang.String jobId) { return this; } + /** + * Optional. Deploy policies to override. Format is + * `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`. + * @return value or {@code null} for none + */ + public java.util.List getOverrideDeployPolicy() { + return overrideDeployPolicy; + } + + /** + * Optional. Deploy policies to override. Format is + * `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`. + * @param overrideDeployPolicy overrideDeployPolicy or {@code null} for none + */ + public IgnoreJobRequest setOverrideDeployPolicy(java.util.List overrideDeployPolicy) { + this.overrideDeployPolicy = overrideDeployPolicy; + return this; + } + /** * Required. The phase ID the Job to ignore belongs to. * @return value or {@code null} for none diff --git a/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/ListDeployPoliciesResponse.java b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/ListDeployPoliciesResponse.java new file mode 100644 index 00000000000..199ea3cb308 --- /dev/null +++ b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/ListDeployPoliciesResponse.java @@ -0,0 +1,123 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.clouddeploy.v1.model; + +/** + * The response object from `ListDeployPolicies`. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Cloud Deploy API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class ListDeployPoliciesResponse extends com.google.api.client.json.GenericJson { + + /** + * The `DeployPolicy` objects. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List deployPolicies; + + static { + // hack to force ProGuard to consider DeployPolicy used, since otherwise it would be stripped out + // see https://github.com/google/google-api-java-client/issues/543 + com.google.api.client.util.Data.nullOf(DeployPolicy.class); + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, + * there are no subsequent pages. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String nextPageToken; + + /** + * Locations that could not be reached. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List unreachable; + + /** + * The `DeployPolicy` objects. + * @return value or {@code null} for none + */ + public java.util.List getDeployPolicies() { + return deployPolicies; + } + + /** + * The `DeployPolicy` objects. + * @param deployPolicies deployPolicies or {@code null} for none + */ + public ListDeployPoliciesResponse setDeployPolicies(java.util.List deployPolicies) { + this.deployPolicies = deployPolicies; + return this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, + * there are no subsequent pages. + * @return value or {@code null} for none + */ + public java.lang.String getNextPageToken() { + return nextPageToken; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, + * there are no subsequent pages. + * @param nextPageToken nextPageToken or {@code null} for none + */ + public ListDeployPoliciesResponse setNextPageToken(java.lang.String nextPageToken) { + this.nextPageToken = nextPageToken; + return this; + } + + /** + * Locations that could not be reached. + * @return value or {@code null} for none + */ + public java.util.List getUnreachable() { + return unreachable; + } + + /** + * Locations that could not be reached. + * @param unreachable unreachable or {@code null} for none + */ + public ListDeployPoliciesResponse setUnreachable(java.util.List unreachable) { + this.unreachable = unreachable; + return this; + } + + @Override + public ListDeployPoliciesResponse set(String fieldName, Object value) { + return (ListDeployPoliciesResponse) super.set(fieldName, value); + } + + @Override + public ListDeployPoliciesResponse clone() { + return (ListDeployPoliciesResponse) super.clone(); + } + +} diff --git a/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/OneTimeWindow.java b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/OneTimeWindow.java new file mode 100644 index 00000000000..952b2085af2 --- /dev/null +++ b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/OneTimeWindow.java @@ -0,0 +1,139 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.clouddeploy.v1.model; + +/** + * One-time window within which actions are restricted. For example, blocking actions over New + * Year's Eve from December 31st at 5pm to January 1st at 9am. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Cloud Deploy API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class OneTimeWindow extends com.google.api.client.json.GenericJson { + + /** + * Required. End date. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private Date endDate; + + /** + * Required. End time (exclusive). You may use 24:00 for the end of the day. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private TimeOfDay endTime; + + /** + * Required. Start date. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private Date startDate; + + /** + * Required. Start time (inclusive). Use 00:00 for the beginning of the day. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private TimeOfDay startTime; + + /** + * Required. End date. + * @return value or {@code null} for none + */ + public Date getEndDate() { + return endDate; + } + + /** + * Required. End date. + * @param endDate endDate or {@code null} for none + */ + public OneTimeWindow setEndDate(Date endDate) { + this.endDate = endDate; + return this; + } + + /** + * Required. End time (exclusive). You may use 24:00 for the end of the day. + * @return value or {@code null} for none + */ + public TimeOfDay getEndTime() { + return endTime; + } + + /** + * Required. End time (exclusive). You may use 24:00 for the end of the day. + * @param endTime endTime or {@code null} for none + */ + public OneTimeWindow setEndTime(TimeOfDay endTime) { + this.endTime = endTime; + return this; + } + + /** + * Required. Start date. + * @return value or {@code null} for none + */ + public Date getStartDate() { + return startDate; + } + + /** + * Required. Start date. + * @param startDate startDate or {@code null} for none + */ + public OneTimeWindow setStartDate(Date startDate) { + this.startDate = startDate; + return this; + } + + /** + * Required. Start time (inclusive). Use 00:00 for the beginning of the day. + * @return value or {@code null} for none + */ + public TimeOfDay getStartTime() { + return startTime; + } + + /** + * Required. Start time (inclusive). Use 00:00 for the beginning of the day. + * @param startTime startTime or {@code null} for none + */ + public OneTimeWindow setStartTime(TimeOfDay startTime) { + this.startTime = startTime; + return this; + } + + @Override + public OneTimeWindow set(String fieldName, Object value) { + return (OneTimeWindow) super.set(fieldName, value); + } + + @Override + public OneTimeWindow clone() { + return (OneTimeWindow) super.clone(); + } + +} diff --git a/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/PolicyRule.java b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/PolicyRule.java new file mode 100644 index 00000000000..bf4c6a0004d --- /dev/null +++ b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/PolicyRule.java @@ -0,0 +1,66 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.clouddeploy.v1.model; + +/** + * Deploy Policy rule. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Cloud Deploy API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class PolicyRule extends com.google.api.client.json.GenericJson { + + /** + * Rollout restrictions. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private RolloutRestriction rolloutRestriction; + + /** + * Rollout restrictions. + * @return value or {@code null} for none + */ + public RolloutRestriction getRolloutRestriction() { + return rolloutRestriction; + } + + /** + * Rollout restrictions. + * @param rolloutRestriction rolloutRestriction or {@code null} for none + */ + public PolicyRule setRolloutRestriction(RolloutRestriction rolloutRestriction) { + this.rolloutRestriction = rolloutRestriction; + return this; + } + + @Override + public PolicyRule set(String fieldName, Object value) { + return (PolicyRule) super.set(fieldName, value); + } + + @Override + public PolicyRule clone() { + return (PolicyRule) super.clone(); + } + +} diff --git a/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/PolicyViolation.java b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/PolicyViolation.java new file mode 100644 index 00000000000..b9f8b028c39 --- /dev/null +++ b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/PolicyViolation.java @@ -0,0 +1,67 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.clouddeploy.v1.model; + +/** + * Returned from an action if one or more policies were violated, and therefore the action was + * prevented. Contains information about what policies were violated and why. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Cloud Deploy API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class PolicyViolation extends com.google.api.client.json.GenericJson { + + /** + * Policy violation details. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List policyViolationDetails; + + /** + * Policy violation details. + * @return value or {@code null} for none + */ + public java.util.List getPolicyViolationDetails() { + return policyViolationDetails; + } + + /** + * Policy violation details. + * @param policyViolationDetails policyViolationDetails or {@code null} for none + */ + public PolicyViolation setPolicyViolationDetails(java.util.List policyViolationDetails) { + this.policyViolationDetails = policyViolationDetails; + return this; + } + + @Override + public PolicyViolation set(String fieldName, Object value) { + return (PolicyViolation) super.set(fieldName, value); + } + + @Override + public PolicyViolation clone() { + return (PolicyViolation) super.clone(); + } + +} diff --git a/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/PolicyViolationDetails.java b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/PolicyViolationDetails.java new file mode 100644 index 00000000000..3a0a349b134 --- /dev/null +++ b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/PolicyViolationDetails.java @@ -0,0 +1,120 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.clouddeploy.v1.model; + +/** + * Policy violation details. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Cloud Deploy API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class PolicyViolationDetails extends com.google.api.client.json.GenericJson { + + /** + * User readable message about why the request violated a policy. This is not intended for machine + * parsing. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String failureMessage; + + /** + * Name of the policy that was violated. Policy resource will be in the format of + * `projects/{project}/locations/{location}/policies/{policy}`. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String policy; + + /** + * Id of the rule that triggered the policy violation. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String ruleId; + + /** + * User readable message about why the request violated a policy. This is not intended for machine + * parsing. + * @return value or {@code null} for none + */ + public java.lang.String getFailureMessage() { + return failureMessage; + } + + /** + * User readable message about why the request violated a policy. This is not intended for machine + * parsing. + * @param failureMessage failureMessage or {@code null} for none + */ + public PolicyViolationDetails setFailureMessage(java.lang.String failureMessage) { + this.failureMessage = failureMessage; + return this; + } + + /** + * Name of the policy that was violated. Policy resource will be in the format of + * `projects/{project}/locations/{location}/policies/{policy}`. + * @return value or {@code null} for none + */ + public java.lang.String getPolicy() { + return policy; + } + + /** + * Name of the policy that was violated. Policy resource will be in the format of + * `projects/{project}/locations/{location}/policies/{policy}`. + * @param policy policy or {@code null} for none + */ + public PolicyViolationDetails setPolicy(java.lang.String policy) { + this.policy = policy; + return this; + } + + /** + * Id of the rule that triggered the policy violation. + * @return value or {@code null} for none + */ + public java.lang.String getRuleId() { + return ruleId; + } + + /** + * Id of the rule that triggered the policy violation. + * @param ruleId ruleId or {@code null} for none + */ + public PolicyViolationDetails setRuleId(java.lang.String ruleId) { + this.ruleId = ruleId; + return this; + } + + @Override + public PolicyViolationDetails set(String fieldName, Object value) { + return (PolicyViolationDetails) super.set(fieldName, value); + } + + @Override + public PolicyViolationDetails clone() { + return (PolicyViolationDetails) super.clone(); + } + +} diff --git a/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/RetryJobRequest.java b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/RetryJobRequest.java index d257421ace7..791f87cf0b1 100644 --- a/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/RetryJobRequest.java +++ b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/RetryJobRequest.java @@ -36,6 +36,14 @@ public final class RetryJobRequest extends com.google.api.client.json.GenericJso @com.google.api.client.util.Key private java.lang.String jobId; + /** + * Optional. Deploy policies to override. Format is + * `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List overrideDeployPolicy; + /** * Required. The phase ID the Job to retry belongs to. * The value may be {@code null}. @@ -60,6 +68,25 @@ public RetryJobRequest setJobId(java.lang.String jobId) { return this; } + /** + * Optional. Deploy policies to override. Format is + * `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`. + * @return value or {@code null} for none + */ + public java.util.List getOverrideDeployPolicy() { + return overrideDeployPolicy; + } + + /** + * Optional. Deploy policies to override. Format is + * `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`. + * @param overrideDeployPolicy overrideDeployPolicy or {@code null} for none + */ + public RetryJobRequest setOverrideDeployPolicy(java.util.List overrideDeployPolicy) { + this.overrideDeployPolicy = overrideDeployPolicy; + return this; + } + /** * Required. The phase ID the Job to retry belongs to. * @return value or {@code null} for none diff --git a/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/RollbackTargetRequest.java b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/RollbackTargetRequest.java index 00212000758..9a2b0d5edd9 100644 --- a/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/RollbackTargetRequest.java +++ b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/RollbackTargetRequest.java @@ -29,6 +29,14 @@ @SuppressWarnings("javadoc") public final class RollbackTargetRequest extends com.google.api.client.json.GenericJson { + /** + * Optional. Deploy policies to override. Format is + * `projects/{project}/locations/{location}/deployPolicies/{deploy_policy}`. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List overrideDeployPolicy; + /** * Optional. ID of the `Release` to roll back to. If this isn't specified, the previous successful * `Rollout` to the specified target will be used to determine the `Release`. @@ -73,6 +81,25 @@ public final class RollbackTargetRequest extends com.google.api.client.json.Gene @com.google.api.client.util.Key private java.lang.Boolean validateOnly; + /** + * Optional. Deploy policies to override. Format is + * `projects/{project}/locations/{location}/deployPolicies/{deploy_policy}`. + * @return value or {@code null} for none + */ + public java.util.List getOverrideDeployPolicy() { + return overrideDeployPolicy; + } + + /** + * Optional. Deploy policies to override. Format is + * `projects/{project}/locations/{location}/deployPolicies/{deploy_policy}`. + * @param overrideDeployPolicy overrideDeployPolicy or {@code null} for none + */ + public RollbackTargetRequest setOverrideDeployPolicy(java.util.List overrideDeployPolicy) { + this.overrideDeployPolicy = overrideDeployPolicy; + return this; + } + /** * Optional. ID of the `Release` to roll back to. If this isn't specified, the previous successful * `Rollout` to the specified target will be used to determine the `Release`. diff --git a/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/RolloutRestriction.java b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/RolloutRestriction.java new file mode 100644 index 00000000000..f1adfee9b44 --- /dev/null +++ b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/RolloutRestriction.java @@ -0,0 +1,144 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.clouddeploy.v1.model; + +/** + * Rollout restrictions. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Cloud Deploy API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class RolloutRestriction extends com.google.api.client.json.GenericJson { + + /** + * Optional. Rollout actions to be restricted as part of the policy. If left empty, all actions + * will be restricted. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List actions; + + /** + * Required. Restriction rule ID. Required and must be unique within a DeployPolicy. The format is + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String id; + + /** + * Optional. What invoked the action. If left empty, all invoker types will be restricted. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List invokers; + + /** + * Required. Time window within which actions are restricted. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private TimeWindows timeWindows; + + /** + * Optional. Rollout actions to be restricted as part of the policy. If left empty, all actions + * will be restricted. + * @return value or {@code null} for none + */ + public java.util.List getActions() { + return actions; + } + + /** + * Optional. Rollout actions to be restricted as part of the policy. If left empty, all actions + * will be restricted. + * @param actions actions or {@code null} for none + */ + public RolloutRestriction setActions(java.util.List actions) { + this.actions = actions; + return this; + } + + /** + * Required. Restriction rule ID. Required and must be unique within a DeployPolicy. The format is + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. + * @return value or {@code null} for none + */ + public java.lang.String getId() { + return id; + } + + /** + * Required. Restriction rule ID. Required and must be unique within a DeployPolicy. The format is + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. + * @param id id or {@code null} for none + */ + public RolloutRestriction setId(java.lang.String id) { + this.id = id; + return this; + } + + /** + * Optional. What invoked the action. If left empty, all invoker types will be restricted. + * @return value or {@code null} for none + */ + public java.util.List getInvokers() { + return invokers; + } + + /** + * Optional. What invoked the action. If left empty, all invoker types will be restricted. + * @param invokers invokers or {@code null} for none + */ + public RolloutRestriction setInvokers(java.util.List invokers) { + this.invokers = invokers; + return this; + } + + /** + * Required. Time window within which actions are restricted. + * @return value or {@code null} for none + */ + public TimeWindows getTimeWindows() { + return timeWindows; + } + + /** + * Required. Time window within which actions are restricted. + * @param timeWindows timeWindows or {@code null} for none + */ + public RolloutRestriction setTimeWindows(TimeWindows timeWindows) { + this.timeWindows = timeWindows; + return this; + } + + @Override + public RolloutRestriction set(String fieldName, Object value) { + return (RolloutRestriction) super.set(fieldName, value); + } + + @Override + public RolloutRestriction clone() { + return (RolloutRestriction) super.clone(); + } + +} diff --git a/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/TerminateJobRunRequest.java b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/TerminateJobRunRequest.java index b36bbaf100a..34d2ddc08cc 100644 --- a/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/TerminateJobRunRequest.java +++ b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/TerminateJobRunRequest.java @@ -29,6 +29,33 @@ @SuppressWarnings("javadoc") public final class TerminateJobRunRequest extends com.google.api.client.json.GenericJson { + /** + * Optional. Deploy policies to override. Format is + * `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List overrideDeployPolicy; + + /** + * Optional. Deploy policies to override. Format is + * `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`. + * @return value or {@code null} for none + */ + public java.util.List getOverrideDeployPolicy() { + return overrideDeployPolicy; + } + + /** + * Optional. Deploy policies to override. Format is + * `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`. + * @param overrideDeployPolicy overrideDeployPolicy or {@code null} for none + */ + public TerminateJobRunRequest setOverrideDeployPolicy(java.util.List overrideDeployPolicy) { + this.overrideDeployPolicy = overrideDeployPolicy; + return this; + } + @Override public TerminateJobRunRequest set(String fieldName, Object value) { return (TerminateJobRunRequest) super.set(fieldName, value); diff --git a/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/TimeOfDay.java b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/TimeOfDay.java new file mode 100644 index 00000000000..5b714833747 --- /dev/null +++ b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/TimeOfDay.java @@ -0,0 +1,146 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.clouddeploy.v1.model; + +/** + * Represents a time of day. The date and time zone are either not significant or are specified + * elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and + * `google.protobuf.Timestamp`. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Cloud Deploy API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class TimeOfDay extends com.google.api.client.json.GenericJson { + + /** + * Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value + * "24:00:00" for scenarios like business closing time. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.Integer hours; + + /** + * Minutes of hour of day. Must be from 0 to 59. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.Integer minutes; + + /** + * Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.Integer nanos; + + /** + * Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if + * it allows leap-seconds. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.Integer seconds; + + /** + * Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value + * "24:00:00" for scenarios like business closing time. + * @return value or {@code null} for none + */ + public java.lang.Integer getHours() { + return hours; + } + + /** + * Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value + * "24:00:00" for scenarios like business closing time. + * @param hours hours or {@code null} for none + */ + public TimeOfDay setHours(java.lang.Integer hours) { + this.hours = hours; + return this; + } + + /** + * Minutes of hour of day. Must be from 0 to 59. + * @return value or {@code null} for none + */ + public java.lang.Integer getMinutes() { + return minutes; + } + + /** + * Minutes of hour of day. Must be from 0 to 59. + * @param minutes minutes or {@code null} for none + */ + public TimeOfDay setMinutes(java.lang.Integer minutes) { + this.minutes = minutes; + return this; + } + + /** + * Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. + * @return value or {@code null} for none + */ + public java.lang.Integer getNanos() { + return nanos; + } + + /** + * Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. + * @param nanos nanos or {@code null} for none + */ + public TimeOfDay setNanos(java.lang.Integer nanos) { + this.nanos = nanos; + return this; + } + + /** + * Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if + * it allows leap-seconds. + * @return value or {@code null} for none + */ + public java.lang.Integer getSeconds() { + return seconds; + } + + /** + * Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if + * it allows leap-seconds. + * @param seconds seconds or {@code null} for none + */ + public TimeOfDay setSeconds(java.lang.Integer seconds) { + this.seconds = seconds; + return this; + } + + @Override + public TimeOfDay set(String fieldName, Object value) { + return (TimeOfDay) super.set(fieldName, value); + } + + @Override + public TimeOfDay clone() { + return (TimeOfDay) super.clone(); + } + +} diff --git a/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/TimeWindows.java b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/TimeWindows.java new file mode 100644 index 00000000000..7939dd348a0 --- /dev/null +++ b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/TimeWindows.java @@ -0,0 +1,123 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.clouddeploy.v1.model; + +/** + * Time windows within which actions are restricted. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Cloud Deploy API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class TimeWindows extends com.google.api.client.json.GenericJson { + + /** + * Optional. One-time windows within which actions are restricted. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List oneTimeWindows; + + static { + // hack to force ProGuard to consider OneTimeWindow used, since otherwise it would be stripped out + // see https://github.com/google/google-api-java-client/issues/543 + com.google.api.client.util.Data.nullOf(OneTimeWindow.class); + } + + /** + * Required. The time zone in IANA format [IANA Time Zone Database](https://www.iana.org/time- + * zones) (e.g. America/New_York). + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String timeZone; + + /** + * Optional. Recurring weekly windows within which actions are restricted. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List weeklyWindows; + + /** + * Optional. One-time windows within which actions are restricted. + * @return value or {@code null} for none + */ + public java.util.List getOneTimeWindows() { + return oneTimeWindows; + } + + /** + * Optional. One-time windows within which actions are restricted. + * @param oneTimeWindows oneTimeWindows or {@code null} for none + */ + public TimeWindows setOneTimeWindows(java.util.List oneTimeWindows) { + this.oneTimeWindows = oneTimeWindows; + return this; + } + + /** + * Required. The time zone in IANA format [IANA Time Zone Database](https://www.iana.org/time- + * zones) (e.g. America/New_York). + * @return value or {@code null} for none + */ + public java.lang.String getTimeZone() { + return timeZone; + } + + /** + * Required. The time zone in IANA format [IANA Time Zone Database](https://www.iana.org/time- + * zones) (e.g. America/New_York). + * @param timeZone timeZone or {@code null} for none + */ + public TimeWindows setTimeZone(java.lang.String timeZone) { + this.timeZone = timeZone; + return this; + } + + /** + * Optional. Recurring weekly windows within which actions are restricted. + * @return value or {@code null} for none + */ + public java.util.List getWeeklyWindows() { + return weeklyWindows; + } + + /** + * Optional. Recurring weekly windows within which actions are restricted. + * @param weeklyWindows weeklyWindows or {@code null} for none + */ + public TimeWindows setWeeklyWindows(java.util.List weeklyWindows) { + this.weeklyWindows = weeklyWindows; + return this; + } + + @Override + public TimeWindows set(String fieldName, Object value) { + return (TimeWindows) super.set(fieldName, value); + } + + @Override + public TimeWindows clone() { + return (TimeWindows) super.clone(); + } + +} diff --git a/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/WeeklyWindow.java b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/WeeklyWindow.java new file mode 100644 index 00000000000..4e36eb9f521 --- /dev/null +++ b/clients/google-api-services-clouddeploy/v1/2.0.0/com/google/api/services/clouddeploy/v1/model/WeeklyWindow.java @@ -0,0 +1,127 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.clouddeploy.v1.model; + +/** + * Weekly windows. For example, blocking actions every Saturday and Sunday. Another example would be + * blocking actions every weekday from 5pm to midnight. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Cloud Deploy API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class WeeklyWindow extends com.google.api.client.json.GenericJson { + + /** + * Optional. Days of week. If left empty, all days of the week will be included. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List daysOfWeek; + + /** + * Optional. End time (exclusive). Use 24:00 to indicate midnight. If you specify end_time you + * must also specify start_time. If left empty, this will block for the entire day for the days + * specified in days_of_week. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private TimeOfDay endTime; + + /** + * Optional. Start time (inclusive). Use 00:00 for the beginning of the day. If you specify + * start_time you must also specify end_time. If left empty, this will block for the entire day + * for the days specified in days_of_week. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private TimeOfDay startTime; + + /** + * Optional. Days of week. If left empty, all days of the week will be included. + * @return value or {@code null} for none + */ + public java.util.List getDaysOfWeek() { + return daysOfWeek; + } + + /** + * Optional. Days of week. If left empty, all days of the week will be included. + * @param daysOfWeek daysOfWeek or {@code null} for none + */ + public WeeklyWindow setDaysOfWeek(java.util.List daysOfWeek) { + this.daysOfWeek = daysOfWeek; + return this; + } + + /** + * Optional. End time (exclusive). Use 24:00 to indicate midnight. If you specify end_time you + * must also specify start_time. If left empty, this will block for the entire day for the days + * specified in days_of_week. + * @return value or {@code null} for none + */ + public TimeOfDay getEndTime() { + return endTime; + } + + /** + * Optional. End time (exclusive). Use 24:00 to indicate midnight. If you specify end_time you + * must also specify start_time. If left empty, this will block for the entire day for the days + * specified in days_of_week. + * @param endTime endTime or {@code null} for none + */ + public WeeklyWindow setEndTime(TimeOfDay endTime) { + this.endTime = endTime; + return this; + } + + /** + * Optional. Start time (inclusive). Use 00:00 for the beginning of the day. If you specify + * start_time you must also specify end_time. If left empty, this will block for the entire day + * for the days specified in days_of_week. + * @return value or {@code null} for none + */ + public TimeOfDay getStartTime() { + return startTime; + } + + /** + * Optional. Start time (inclusive). Use 00:00 for the beginning of the day. If you specify + * start_time you must also specify end_time. If left empty, this will block for the entire day + * for the days specified in days_of_week. + * @param startTime startTime or {@code null} for none + */ + public WeeklyWindow setStartTime(TimeOfDay startTime) { + this.startTime = startTime; + return this; + } + + @Override + public WeeklyWindow set(String fieldName, Object value) { + return (WeeklyWindow) super.set(fieldName, value); + } + + @Override + public WeeklyWindow clone() { + return (WeeklyWindow) super.clone(); + } + +} diff --git a/clients/google-api-services-clouddeploy/v1/2.0.0/pom.xml b/clients/google-api-services-clouddeploy/v1/2.0.0/pom.xml index 5b39b941ee5..ee6a40fd94a 100644 --- a/clients/google-api-services-clouddeploy/v1/2.0.0/pom.xml +++ b/clients/google-api-services-clouddeploy/v1/2.0.0/pom.xml @@ -8,8 +8,8 @@ com.google.apis google-api-services-clouddeploy - v1-rev20240809-2.0.0 - Cloud Deploy API v1-rev20240809-2.0.0 + v1-rev20240920-2.0.0 + Cloud Deploy API v1-rev20240920-2.0.0 jar 2011 diff --git a/clients/google-api-services-clouddeploy/v1/README.md b/clients/google-api-services-clouddeploy/v1/README.md index 27ba77c25ab..6bac42fc209 100644 --- a/clients/google-api-services-clouddeploy/v1/README.md +++ b/clients/google-api-services-clouddeploy/v1/README.md @@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file: com.google.apis google-api-services-clouddeploy - v1-rev20240809-2.0.0 + v1-rev20240920-2.0.0 @@ -35,7 +35,7 @@ repositories { mavenCentral() } dependencies { - implementation 'com.google.apis:google-api-services-clouddeploy:v1-rev20240809-2.0.0' + implementation 'com.google.apis:google-api-services-clouddeploy:v1-rev20240920-2.0.0' } ```