
com.google.api.services.accessapproval.v1.model.SignatureInfo Maven / Gradle / Ivy
/*
* 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.accessapproval.v1.model;
/**
* Information about the digital signature of the resource.
*
* 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 Access Approval 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 SignatureInfo extends com.google.api.client.json.GenericJson {
/**
* The resource name of the customer CryptoKeyVersion used for signing.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String customerKmsKeyVersion;
/**
* The hashing algorithm used for signature verification. It will only be present in the case of
* Google managed keys.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String googleKeyAlgorithm;
/**
* The public key for the Google default signing, encoded in PEM format. The signature was created
* using a private key which may be verified using this public key.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String googlePublicKeyPem;
/**
* The ApprovalRequest that is serialized without the SignatureInfo message field. This data is
* used with the hashing algorithm to generate the digital signature, and it can be used for
* signature verification.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String serializedApprovalRequest;
/**
* The digital signature.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String signature;
/**
* The resource name of the customer CryptoKeyVersion used for signing.
* @return value or {@code null} for none
*/
public java.lang.String getCustomerKmsKeyVersion() {
return customerKmsKeyVersion;
}
/**
* The resource name of the customer CryptoKeyVersion used for signing.
* @param customerKmsKeyVersion customerKmsKeyVersion or {@code null} for none
*/
public SignatureInfo setCustomerKmsKeyVersion(java.lang.String customerKmsKeyVersion) {
this.customerKmsKeyVersion = customerKmsKeyVersion;
return this;
}
/**
* The hashing algorithm used for signature verification. It will only be present in the case of
* Google managed keys.
* @return value or {@code null} for none
*/
public java.lang.String getGoogleKeyAlgorithm() {
return googleKeyAlgorithm;
}
/**
* The hashing algorithm used for signature verification. It will only be present in the case of
* Google managed keys.
* @param googleKeyAlgorithm googleKeyAlgorithm or {@code null} for none
*/
public SignatureInfo setGoogleKeyAlgorithm(java.lang.String googleKeyAlgorithm) {
this.googleKeyAlgorithm = googleKeyAlgorithm;
return this;
}
/**
* The public key for the Google default signing, encoded in PEM format. The signature was created
* using a private key which may be verified using this public key.
* @return value or {@code null} for none
*/
public java.lang.String getGooglePublicKeyPem() {
return googlePublicKeyPem;
}
/**
* The public key for the Google default signing, encoded in PEM format. The signature was created
* using a private key which may be verified using this public key.
* @param googlePublicKeyPem googlePublicKeyPem or {@code null} for none
*/
public SignatureInfo setGooglePublicKeyPem(java.lang.String googlePublicKeyPem) {
this.googlePublicKeyPem = googlePublicKeyPem;
return this;
}
/**
* The ApprovalRequest that is serialized without the SignatureInfo message field. This data is
* used with the hashing algorithm to generate the digital signature, and it can be used for
* signature verification.
* @see #decodeSerializedApprovalRequest()
* @return value or {@code null} for none
*/
public java.lang.String getSerializedApprovalRequest() {
return serializedApprovalRequest;
}
/**
* The ApprovalRequest that is serialized without the SignatureInfo message field. This data is
* used with the hashing algorithm to generate the digital signature, and it can be used for
* signature verification.
* @see #getSerializedApprovalRequest()
* @return Base64 decoded value or {@code null} for none
*
* @since 1.14
*/
public byte[] decodeSerializedApprovalRequest() {
return com.google.api.client.util.Base64.decodeBase64(serializedApprovalRequest);
}
/**
* The ApprovalRequest that is serialized without the SignatureInfo message field. This data is
* used with the hashing algorithm to generate the digital signature, and it can be used for
* signature verification.
* @see #encodeSerializedApprovalRequest()
* @param serializedApprovalRequest serializedApprovalRequest or {@code null} for none
*/
public SignatureInfo setSerializedApprovalRequest(java.lang.String serializedApprovalRequest) {
this.serializedApprovalRequest = serializedApprovalRequest;
return this;
}
/**
* The ApprovalRequest that is serialized without the SignatureInfo message field. This data is
* used with the hashing algorithm to generate the digital signature, and it can be used for
* signature verification.
* @see #setSerializedApprovalRequest()
*
*
* The value is encoded Base64 or {@code null} for none.
*
*
* @since 1.14
*/
public SignatureInfo encodeSerializedApprovalRequest(byte[] serializedApprovalRequest) {
this.serializedApprovalRequest = com.google.api.client.util.Base64.encodeBase64URLSafeString(serializedApprovalRequest);
return this;
}
/**
* The digital signature.
* @see #decodeSignature()
* @return value or {@code null} for none
*/
public java.lang.String getSignature() {
return signature;
}
/**
* The digital signature.
* @see #getSignature()
* @return Base64 decoded value or {@code null} for none
*
* @since 1.14
*/
public byte[] decodeSignature() {
return com.google.api.client.util.Base64.decodeBase64(signature);
}
/**
* The digital signature.
* @see #encodeSignature()
* @param signature signature or {@code null} for none
*/
public SignatureInfo setSignature(java.lang.String signature) {
this.signature = signature;
return this;
}
/**
* The digital signature.
* @see #setSignature()
*
*
* The value is encoded Base64 or {@code null} for none.
*
*
* @since 1.14
*/
public SignatureInfo encodeSignature(byte[] signature) {
this.signature = com.google.api.client.util.Base64.encodeBase64URLSafeString(signature);
return this;
}
@Override
public SignatureInfo set(String fieldName, Object value) {
return (SignatureInfo) super.set(fieldName, value);
}
@Override
public SignatureInfo clone() {
return (SignatureInfo) super.clone();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy