All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.api.services.secretmanager.v1.model.Secret Maven / Gradle / Ivy

The newest version!
/*
 * 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.secretmanager.v1.model;

/**
 * A Secret is a logical secret whose value and versions can be accessed. A Secret is made up of
 * zero or more SecretVersions that represent the secret data.
 *
 * 

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 Secret Manager 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 Secret extends com.google.api.client.json.GenericJson { /** * Optional. Custom metadata about the secret. Annotations are distinct from various forms of * labels. Annotations exist to allow client tools to store their own state information without * requiring a database. Annotation keys must be between 1 and 63 characters long, have a UTF-8 * encoding of maximum 128 bytes, begin and end with an alphanumeric character ([a-z0-9A-Z]), and * may have dashes (-), underscores (_), dots (.), and alphanumerics in between these symbols. The * total size of annotation keys and values must be less than 16KiB. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.Map annotations; /** * Output only. The time at which the Secret was created. * The value may be {@code null}. */ @com.google.api.client.util.Key private String createTime; /** * Optional. The customer-managed encryption configuration of the regionalized secrets. If no * configuration is provided, Google-managed default encryption is used. Updates to the Secret * encryption configuration only apply to SecretVersions added afterwards. They do not apply * retroactively to existing SecretVersions. * The value may be {@code null}. */ @com.google.api.client.util.Key private CustomerManagedEncryption customerManagedEncryption; /** * Optional. Etag of the currently stored Secret. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String etag; /** * Optional. Timestamp in UTC when the Secret is scheduled to expire. This is always provided on * output, regardless of what was sent on input. * The value may be {@code null}. */ @com.google.api.client.util.Key private String expireTime; /** * The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a * UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: * `\p{Ll}\p{Lo}{0,62}` Label values must be between 0 and 63 characters long, have a UTF-8 * encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: * `[\p{Ll}\p{Lo}\p{N}_-]{0,63}` No more than 64 labels can be assigned to a given resource. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.Map labels; /** * Output only. The resource name of the Secret in the format `projects/secrets`. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String name; /** * Optional. Immutable. The replication policy of the secret data attached to the Secret. The * replication policy cannot be changed after the Secret has been created. * The value may be {@code null}. */ @com.google.api.client.util.Key private Replication replication; /** * Optional. Rotation policy attached to the Secret. May be excluded if there is no rotation * policy. * The value may be {@code null}. */ @com.google.api.client.util.Key private Rotation rotation; /** * Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane * operations are called on the secret or its versions. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.List topics; /** * Input only. The TTL for the Secret. * The value may be {@code null}. */ @com.google.api.client.util.Key private String ttl; /** * Optional. Mapping from version alias to version name. A version alias is a string with a * maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and * the hyphen (`-`) and underscore ('_') characters. An alias string must start with a letter and * cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given * secret. Version-Alias pairs will be viewable via GetSecret and modifiable via UpdateSecret. * Access by alias is only be supported on GetSecretVersion and AccessSecretVersion. * The value may be {@code null}. */ @com.google.api.client.util.Key @com.google.api.client.json.JsonString private java.util.Map versionAliases; /** * Optional. Secret Version TTL after destruction request This is a part of the Delayed secret * version destroy feature. For secret with TTL>0, version destruction doesn't happen immediately * on calling destroy instead the version goes to a disabled state and destruction happens after * the TTL expires. * The value may be {@code null}. */ @com.google.api.client.util.Key private String versionDestroyTtl; /** * Optional. Custom metadata about the secret. Annotations are distinct from various forms of * labels. Annotations exist to allow client tools to store their own state information without * requiring a database. Annotation keys must be between 1 and 63 characters long, have a UTF-8 * encoding of maximum 128 bytes, begin and end with an alphanumeric character ([a-z0-9A-Z]), and * may have dashes (-), underscores (_), dots (.), and alphanumerics in between these symbols. The * total size of annotation keys and values must be less than 16KiB. * @return value or {@code null} for none */ public java.util.Map getAnnotations() { return annotations; } /** * Optional. Custom metadata about the secret. Annotations are distinct from various forms of * labels. Annotations exist to allow client tools to store their own state information without * requiring a database. Annotation keys must be between 1 and 63 characters long, have a UTF-8 * encoding of maximum 128 bytes, begin and end with an alphanumeric character ([a-z0-9A-Z]), and * may have dashes (-), underscores (_), dots (.), and alphanumerics in between these symbols. The * total size of annotation keys and values must be less than 16KiB. * @param annotations annotations or {@code null} for none */ public Secret setAnnotations(java.util.Map annotations) { this.annotations = annotations; return this; } /** * Output only. The time at which the Secret was created. * @return value or {@code null} for none */ public String getCreateTime() { return createTime; } /** * Output only. The time at which the Secret was created. * @param createTime createTime or {@code null} for none */ public Secret setCreateTime(String createTime) { this.createTime = createTime; return this; } /** * Optional. The customer-managed encryption configuration of the regionalized secrets. If no * configuration is provided, Google-managed default encryption is used. Updates to the Secret * encryption configuration only apply to SecretVersions added afterwards. They do not apply * retroactively to existing SecretVersions. * @return value or {@code null} for none */ public CustomerManagedEncryption getCustomerManagedEncryption() { return customerManagedEncryption; } /** * Optional. The customer-managed encryption configuration of the regionalized secrets. If no * configuration is provided, Google-managed default encryption is used. Updates to the Secret * encryption configuration only apply to SecretVersions added afterwards. They do not apply * retroactively to existing SecretVersions. * @param customerManagedEncryption customerManagedEncryption or {@code null} for none */ public Secret setCustomerManagedEncryption(CustomerManagedEncryption customerManagedEncryption) { this.customerManagedEncryption = customerManagedEncryption; return this; } /** * Optional. Etag of the currently stored Secret. * @return value or {@code null} for none */ public java.lang.String getEtag() { return etag; } /** * Optional. Etag of the currently stored Secret. * @param etag etag or {@code null} for none */ public Secret setEtag(java.lang.String etag) { this.etag = etag; return this; } /** * Optional. Timestamp in UTC when the Secret is scheduled to expire. This is always provided on * output, regardless of what was sent on input. * @return value or {@code null} for none */ public String getExpireTime() { return expireTime; } /** * Optional. Timestamp in UTC when the Secret is scheduled to expire. This is always provided on * output, regardless of what was sent on input. * @param expireTime expireTime or {@code null} for none */ public Secret setExpireTime(String expireTime) { this.expireTime = expireTime; return this; } /** * The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a * UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: * `\p{Ll}\p{Lo}{0,62}` Label values must be between 0 and 63 characters long, have a UTF-8 * encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: * `[\p{Ll}\p{Lo}\p{N}_-]{0,63}` No more than 64 labels can be assigned to a given resource. * @return value or {@code null} for none */ public java.util.Map getLabels() { return labels; } /** * The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a * UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: * `\p{Ll}\p{Lo}{0,62}` Label values must be between 0 and 63 characters long, have a UTF-8 * encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: * `[\p{Ll}\p{Lo}\p{N}_-]{0,63}` No more than 64 labels can be assigned to a given resource. * @param labels labels or {@code null} for none */ public Secret setLabels(java.util.Map labels) { this.labels = labels; return this; } /** * Output only. The resource name of the Secret in the format `projects/secrets`. * @return value or {@code null} for none */ public java.lang.String getName() { return name; } /** * Output only. The resource name of the Secret in the format `projects/secrets`. * @param name name or {@code null} for none */ public Secret setName(java.lang.String name) { this.name = name; return this; } /** * Optional. Immutable. The replication policy of the secret data attached to the Secret. The * replication policy cannot be changed after the Secret has been created. * @return value or {@code null} for none */ public Replication getReplication() { return replication; } /** * Optional. Immutable. The replication policy of the secret data attached to the Secret. The * replication policy cannot be changed after the Secret has been created. * @param replication replication or {@code null} for none */ public Secret setReplication(Replication replication) { this.replication = replication; return this; } /** * Optional. Rotation policy attached to the Secret. May be excluded if there is no rotation * policy. * @return value or {@code null} for none */ public Rotation getRotation() { return rotation; } /** * Optional. Rotation policy attached to the Secret. May be excluded if there is no rotation * policy. * @param rotation rotation or {@code null} for none */ public Secret setRotation(Rotation rotation) { this.rotation = rotation; return this; } /** * Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane * operations are called on the secret or its versions. * @return value or {@code null} for none */ public java.util.List getTopics() { return topics; } /** * Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane * operations are called on the secret or its versions. * @param topics topics or {@code null} for none */ public Secret setTopics(java.util.List topics) { this.topics = topics; return this; } /** * Input only. The TTL for the Secret. * @return value or {@code null} for none */ public String getTtl() { return ttl; } /** * Input only. The TTL for the Secret. * @param ttl ttl or {@code null} for none */ public Secret setTtl(String ttl) { this.ttl = ttl; return this; } /** * Optional. Mapping from version alias to version name. A version alias is a string with a * maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and * the hyphen (`-`) and underscore ('_') characters. An alias string must start with a letter and * cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given * secret. Version-Alias pairs will be viewable via GetSecret and modifiable via UpdateSecret. * Access by alias is only be supported on GetSecretVersion and AccessSecretVersion. * @return value or {@code null} for none */ public java.util.Map getVersionAliases() { return versionAliases; } /** * Optional. Mapping from version alias to version name. A version alias is a string with a * maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and * the hyphen (`-`) and underscore ('_') characters. An alias string must start with a letter and * cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given * secret. Version-Alias pairs will be viewable via GetSecret and modifiable via UpdateSecret. * Access by alias is only be supported on GetSecretVersion and AccessSecretVersion. * @param versionAliases versionAliases or {@code null} for none */ public Secret setVersionAliases(java.util.Map versionAliases) { this.versionAliases = versionAliases; return this; } /** * Optional. Secret Version TTL after destruction request This is a part of the Delayed secret * version destroy feature. For secret with TTL>0, version destruction doesn't happen immediately * on calling destroy instead the version goes to a disabled state and destruction happens after * the TTL expires. * @return value or {@code null} for none */ public String getVersionDestroyTtl() { return versionDestroyTtl; } /** * Optional. Secret Version TTL after destruction request This is a part of the Delayed secret * version destroy feature. For secret with TTL>0, version destruction doesn't happen immediately * on calling destroy instead the version goes to a disabled state and destruction happens after * the TTL expires. * @param versionDestroyTtl versionDestroyTtl or {@code null} for none */ public Secret setVersionDestroyTtl(String versionDestroyTtl) { this.versionDestroyTtl = versionDestroyTtl; return this; } @Override public Secret set(String fieldName, Object value) { return (Secret) super.set(fieldName, value); } @Override public Secret clone() { return (Secret) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy