com.google.storage.v2.HmacKeyMetadata Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-cloud-storage-v2 Show documentation
Show all versions of proto-google-cloud-storage-v2 Show documentation
PROTO library for proto-google-cloud-storage-v2
/*
* Copyright 2024 Google LLC
*
* 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
*
* https://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.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/storage/v2/storage.proto
// Protobuf Java Version: 3.25.2
package com.google.storage.v2;
/**
*
*
*
* Hmac Key Metadata, which includes all information other than the secret.
*
*
* Protobuf type {@code google.storage.v2.HmacKeyMetadata}
*/
public final class HmacKeyMetadata extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.storage.v2.HmacKeyMetadata)
HmacKeyMetadataOrBuilder {
private static final long serialVersionUID = 0L;
// Use HmacKeyMetadata.newBuilder() to construct.
private HmacKeyMetadata(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private HmacKeyMetadata() {
id_ = "";
accessId_ = "";
project_ = "";
serviceAccountEmail_ = "";
state_ = "";
etag_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new HmacKeyMetadata();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.storage.v2.StorageProto
.internal_static_google_storage_v2_HmacKeyMetadata_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.storage.v2.StorageProto
.internal_static_google_storage_v2_HmacKeyMetadata_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.storage.v2.HmacKeyMetadata.class,
com.google.storage.v2.HmacKeyMetadata.Builder.class);
}
private int bitField0_;
public static final int ID_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object id_ = "";
/**
*
*
*
* Immutable. Resource name ID of the key in the format
* {projectIdentifier}/{accessId}.
* {projectIdentifier} can be the project ID or project number.
*
*
* string id = 1 [(.google.api.field_behavior) = IMMUTABLE];
*
* @return The id.
*/
@java.lang.Override
public java.lang.String getId() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
}
}
/**
*
*
*
* Immutable. Resource name ID of the key in the format
* {projectIdentifier}/{accessId}.
* {projectIdentifier} can be the project ID or project number.
*
*
* string id = 1 [(.google.api.field_behavior) = IMMUTABLE];
*
* @return The bytes for id.
*/
@java.lang.Override
public com.google.protobuf.ByteString getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ACCESS_ID_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object accessId_ = "";
/**
*
*
*
* Immutable. Globally unique id for keys.
*
*
* string access_id = 2 [(.google.api.field_behavior) = IMMUTABLE];
*
* @return The accessId.
*/
@java.lang.Override
public java.lang.String getAccessId() {
java.lang.Object ref = accessId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
accessId_ = s;
return s;
}
}
/**
*
*
*
* Immutable. Globally unique id for keys.
*
*
* string access_id = 2 [(.google.api.field_behavior) = IMMUTABLE];
*
* @return The bytes for accessId.
*/
@java.lang.Override
public com.google.protobuf.ByteString getAccessIdBytes() {
java.lang.Object ref = accessId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
accessId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PROJECT_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object project_ = "";
/**
*
*
*
* Immutable. Identifies the project that owns the service account of the
* specified HMAC key, in the format "projects/{projectIdentifier}".
* {projectIdentifier} can be the project ID or project number.
*
*
*
* string project = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
*
*
* @return The project.
*/
@java.lang.Override
public java.lang.String getProject() {
java.lang.Object ref = project_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
project_ = s;
return s;
}
}
/**
*
*
*
* Immutable. Identifies the project that owns the service account of the
* specified HMAC key, in the format "projects/{projectIdentifier}".
* {projectIdentifier} can be the project ID or project number.
*
*
*
* string project = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
*
*
* @return The bytes for project.
*/
@java.lang.Override
public com.google.protobuf.ByteString getProjectBytes() {
java.lang.Object ref = project_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
project_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private volatile java.lang.Object serviceAccountEmail_ = "";
/**
*
*
*
* Output only. Email of the service account the key authenticates as.
*
*
* string service_account_email = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The serviceAccountEmail.
*/
@java.lang.Override
public java.lang.String getServiceAccountEmail() {
java.lang.Object ref = serviceAccountEmail_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
serviceAccountEmail_ = s;
return s;
}
}
/**
*
*
*
* Output only. Email of the service account the key authenticates as.
*
*
* string service_account_email = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for serviceAccountEmail.
*/
@java.lang.Override
public com.google.protobuf.ByteString getServiceAccountEmailBytes() {
java.lang.Object ref = serviceAccountEmail_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
serviceAccountEmail_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int STATE_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private volatile java.lang.Object state_ = "";
/**
*
*
*
* State of the key. One of ACTIVE, INACTIVE, or DELETED.
* Writable, can be updated by UpdateHmacKey operation.
*
*
* string state = 5;
*
* @return The state.
*/
@java.lang.Override
public java.lang.String getState() {
java.lang.Object ref = state_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
state_ = s;
return s;
}
}
/**
*
*
*
* State of the key. One of ACTIVE, INACTIVE, or DELETED.
* Writable, can be updated by UpdateHmacKey operation.
*
*
* string state = 5;
*
* @return The bytes for state.
*/
@java.lang.Override
public com.google.protobuf.ByteString getStateBytes() {
java.lang.Object ref = state_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
state_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CREATE_TIME_FIELD_NUMBER = 6;
private com.google.protobuf.Timestamp createTime_;
/**
*
*
*
* Output only. The creation time of the HMAC key.
*
*
* .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the createTime field is set.
*/
@java.lang.Override
public boolean hasCreateTime() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Output only. The creation time of the HMAC key.
*
*
* .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The createTime.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getCreateTime() {
return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
}
/**
*
*
*
* Output only. The creation time of the HMAC key.
*
*
* .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
}
public static final int UPDATE_TIME_FIELD_NUMBER = 7;
private com.google.protobuf.Timestamp updateTime_;
/**
*
*
*
* Output only. The last modification time of the HMAC key metadata.
*
*
* .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the updateTime field is set.
*/
@java.lang.Override
public boolean hasUpdateTime() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Output only. The last modification time of the HMAC key metadata.
*
*
* .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The updateTime.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getUpdateTime() {
return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
}
/**
*
*
*
* Output only. The last modification time of the HMAC key metadata.
*
*
* .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
}
public static final int ETAG_FIELD_NUMBER = 8;
@SuppressWarnings("serial")
private volatile java.lang.Object etag_ = "";
/**
*
*
*
* The etag of the HMAC key.
*
*
* string etag = 8;
*
* @return The etag.
*/
@java.lang.Override
public java.lang.String getEtag() {
java.lang.Object ref = etag_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
etag_ = s;
return s;
}
}
/**
*
*
*
* The etag of the HMAC key.
*
*
* string etag = 8;
*
* @return The bytes for etag.
*/
@java.lang.Override
public com.google.protobuf.ByteString getEtagBytes() {
java.lang.Object ref = etag_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
etag_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accessId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, accessId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, project_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountEmail_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, serviceAccountEmail_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(state_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, state_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(6, getCreateTime());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(7, getUpdateTime());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 8, etag_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accessId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, accessId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, project_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountEmail_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, serviceAccountEmail_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(state_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, state_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCreateTime());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getUpdateTime());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, etag_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.storage.v2.HmacKeyMetadata)) {
return super.equals(obj);
}
com.google.storage.v2.HmacKeyMetadata other = (com.google.storage.v2.HmacKeyMetadata) obj;
if (!getId().equals(other.getId())) return false;
if (!getAccessId().equals(other.getAccessId())) return false;
if (!getProject().equals(other.getProject())) return false;
if (!getServiceAccountEmail().equals(other.getServiceAccountEmail())) return false;
if (!getState().equals(other.getState())) return false;
if (hasCreateTime() != other.hasCreateTime()) return false;
if (hasCreateTime()) {
if (!getCreateTime().equals(other.getCreateTime())) return false;
}
if (hasUpdateTime() != other.hasUpdateTime()) return false;
if (hasUpdateTime()) {
if (!getUpdateTime().equals(other.getUpdateTime())) return false;
}
if (!getEtag().equals(other.getEtag())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
hash = (37 * hash) + ACCESS_ID_FIELD_NUMBER;
hash = (53 * hash) + getAccessId().hashCode();
hash = (37 * hash) + PROJECT_FIELD_NUMBER;
hash = (53 * hash) + getProject().hashCode();
hash = (37 * hash) + SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER;
hash = (53 * hash) + getServiceAccountEmail().hashCode();
hash = (37 * hash) + STATE_FIELD_NUMBER;
hash = (53 * hash) + getState().hashCode();
if (hasCreateTime()) {
hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER;
hash = (53 * hash) + getCreateTime().hashCode();
}
if (hasUpdateTime()) {
hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER;
hash = (53 * hash) + getUpdateTime().hashCode();
}
hash = (37 * hash) + ETAG_FIELD_NUMBER;
hash = (53 * hash) + getEtag().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.storage.v2.HmacKeyMetadata parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.storage.v2.HmacKeyMetadata parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.storage.v2.HmacKeyMetadata parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.storage.v2.HmacKeyMetadata parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.storage.v2.HmacKeyMetadata parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.storage.v2.HmacKeyMetadata parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.storage.v2.HmacKeyMetadata parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.storage.v2.HmacKeyMetadata parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.storage.v2.HmacKeyMetadata parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.storage.v2.HmacKeyMetadata parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.storage.v2.HmacKeyMetadata parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.storage.v2.HmacKeyMetadata parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.storage.v2.HmacKeyMetadata prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Hmac Key Metadata, which includes all information other than the secret.
*
*
* Protobuf type {@code google.storage.v2.HmacKeyMetadata}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.storage.v2.HmacKeyMetadata)
com.google.storage.v2.HmacKeyMetadataOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.storage.v2.StorageProto
.internal_static_google_storage_v2_HmacKeyMetadata_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.storage.v2.StorageProto
.internal_static_google_storage_v2_HmacKeyMetadata_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.storage.v2.HmacKeyMetadata.class,
com.google.storage.v2.HmacKeyMetadata.Builder.class);
}
// Construct using com.google.storage.v2.HmacKeyMetadata.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getCreateTimeFieldBuilder();
getUpdateTimeFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
id_ = "";
accessId_ = "";
project_ = "";
serviceAccountEmail_ = "";
state_ = "";
createTime_ = null;
if (createTimeBuilder_ != null) {
createTimeBuilder_.dispose();
createTimeBuilder_ = null;
}
updateTime_ = null;
if (updateTimeBuilder_ != null) {
updateTimeBuilder_.dispose();
updateTimeBuilder_ = null;
}
etag_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.storage.v2.StorageProto
.internal_static_google_storage_v2_HmacKeyMetadata_descriptor;
}
@java.lang.Override
public com.google.storage.v2.HmacKeyMetadata getDefaultInstanceForType() {
return com.google.storage.v2.HmacKeyMetadata.getDefaultInstance();
}
@java.lang.Override
public com.google.storage.v2.HmacKeyMetadata build() {
com.google.storage.v2.HmacKeyMetadata result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.storage.v2.HmacKeyMetadata buildPartial() {
com.google.storage.v2.HmacKeyMetadata result =
new com.google.storage.v2.HmacKeyMetadata(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.storage.v2.HmacKeyMetadata result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.id_ = id_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.accessId_ = accessId_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.project_ = project_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.serviceAccountEmail_ = serviceAccountEmail_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.state_ = state_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000020) != 0)) {
result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.etag_ = etag_;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.storage.v2.HmacKeyMetadata) {
return mergeFrom((com.google.storage.v2.HmacKeyMetadata) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.storage.v2.HmacKeyMetadata other) {
if (other == com.google.storage.v2.HmacKeyMetadata.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getAccessId().isEmpty()) {
accessId_ = other.accessId_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getProject().isEmpty()) {
project_ = other.project_;
bitField0_ |= 0x00000004;
onChanged();
}
if (!other.getServiceAccountEmail().isEmpty()) {
serviceAccountEmail_ = other.serviceAccountEmail_;
bitField0_ |= 0x00000008;
onChanged();
}
if (!other.getState().isEmpty()) {
state_ = other.state_;
bitField0_ |= 0x00000010;
onChanged();
}
if (other.hasCreateTime()) {
mergeCreateTime(other.getCreateTime());
}
if (other.hasUpdateTime()) {
mergeUpdateTime(other.getUpdateTime());
}
if (!other.getEtag().isEmpty()) {
etag_ = other.etag_;
bitField0_ |= 0x00000080;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
id_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
accessId_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
project_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34:
{
serviceAccountEmail_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case 34
case 42:
{
state_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
break;
} // case 42
case 50:
{
input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 50
case 58:
{
input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000040;
break;
} // case 58
case 66:
{
etag_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000080;
break;
} // case 66
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object id_ = "";
/**
*
*
*
* Immutable. Resource name ID of the key in the format
* {projectIdentifier}/{accessId}.
* {projectIdentifier} can be the project ID or project number.
*
*
* string id = 1 [(.google.api.field_behavior) = IMMUTABLE];
*
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Immutable. Resource name ID of the key in the format
* {projectIdentifier}/{accessId}.
* {projectIdentifier} can be the project ID or project number.
*
*
* string id = 1 [(.google.api.field_behavior) = IMMUTABLE];
*
* @return The bytes for id.
*/
public com.google.protobuf.ByteString getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Immutable. Resource name ID of the key in the format
* {projectIdentifier}/{accessId}.
* {projectIdentifier} can be the project ID or project number.
*
*
* string id = 1 [(.google.api.field_behavior) = IMMUTABLE];
*
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
id_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Immutable. Resource name ID of the key in the format
* {projectIdentifier}/{accessId}.
* {projectIdentifier} can be the project ID or project number.
*
*
* string id = 1 [(.google.api.field_behavior) = IMMUTABLE];
*
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Immutable. Resource name ID of the key in the format
* {projectIdentifier}/{accessId}.
* {projectIdentifier} can be the project ID or project number.
*
*
* string id = 1 [(.google.api.field_behavior) = IMMUTABLE];
*
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
id_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object accessId_ = "";
/**
*
*
*
* Immutable. Globally unique id for keys.
*
*
* string access_id = 2 [(.google.api.field_behavior) = IMMUTABLE];
*
* @return The accessId.
*/
public java.lang.String getAccessId() {
java.lang.Object ref = accessId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
accessId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Immutable. Globally unique id for keys.
*
*
* string access_id = 2 [(.google.api.field_behavior) = IMMUTABLE];
*
* @return The bytes for accessId.
*/
public com.google.protobuf.ByteString getAccessIdBytes() {
java.lang.Object ref = accessId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
accessId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Immutable. Globally unique id for keys.
*
*
* string access_id = 2 [(.google.api.field_behavior) = IMMUTABLE];
*
* @param value The accessId to set.
* @return This builder for chaining.
*/
public Builder setAccessId(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
accessId_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Immutable. Globally unique id for keys.
*
*
* string access_id = 2 [(.google.api.field_behavior) = IMMUTABLE];
*
* @return This builder for chaining.
*/
public Builder clearAccessId() {
accessId_ = getDefaultInstance().getAccessId();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Immutable. Globally unique id for keys.
*
*
* string access_id = 2 [(.google.api.field_behavior) = IMMUTABLE];
*
* @param value The bytes for accessId to set.
* @return This builder for chaining.
*/
public Builder setAccessIdBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
accessId_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object project_ = "";
/**
*
*
*
* Immutable. Identifies the project that owns the service account of the
* specified HMAC key, in the format "projects/{projectIdentifier}".
* {projectIdentifier} can be the project ID or project number.
*
*
*
* string project = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
*
*
* @return The project.
*/
public java.lang.String getProject() {
java.lang.Object ref = project_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
project_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Immutable. Identifies the project that owns the service account of the
* specified HMAC key, in the format "projects/{projectIdentifier}".
* {projectIdentifier} can be the project ID or project number.
*
*
*
* string project = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
*
*
* @return The bytes for project.
*/
public com.google.protobuf.ByteString getProjectBytes() {
java.lang.Object ref = project_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
project_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Immutable. Identifies the project that owns the service account of the
* specified HMAC key, in the format "projects/{projectIdentifier}".
* {projectIdentifier} can be the project ID or project number.
*
*
*
* string project = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
*
*
* @param value The project to set.
* @return This builder for chaining.
*/
public Builder setProject(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
project_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Immutable. Identifies the project that owns the service account of the
* specified HMAC key, in the format "projects/{projectIdentifier}".
* {projectIdentifier} can be the project ID or project number.
*
*
*
* string project = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
*
*
* @return This builder for chaining.
*/
public Builder clearProject() {
project_ = getDefaultInstance().getProject();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* Immutable. Identifies the project that owns the service account of the
* specified HMAC key, in the format "projects/{projectIdentifier}".
* {projectIdentifier} can be the project ID or project number.
*
*
*
* string project = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
*
*
* @param value The bytes for project to set.
* @return This builder for chaining.
*/
public Builder setProjectBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
project_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private java.lang.Object serviceAccountEmail_ = "";
/**
*
*
*
* Output only. Email of the service account the key authenticates as.
*
*
* string service_account_email = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The serviceAccountEmail.
*/
public java.lang.String getServiceAccountEmail() {
java.lang.Object ref = serviceAccountEmail_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
serviceAccountEmail_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Output only. Email of the service account the key authenticates as.
*
*
* string service_account_email = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for serviceAccountEmail.
*/
public com.google.protobuf.ByteString getServiceAccountEmailBytes() {
java.lang.Object ref = serviceAccountEmail_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
serviceAccountEmail_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Output only. Email of the service account the key authenticates as.
*
*
* string service_account_email = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The serviceAccountEmail to set.
* @return This builder for chaining.
*/
public Builder setServiceAccountEmail(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
serviceAccountEmail_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Output only. Email of the service account the key authenticates as.
*
*
* string service_account_email = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearServiceAccountEmail() {
serviceAccountEmail_ = getDefaultInstance().getServiceAccountEmail();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
*
*
* Output only. Email of the service account the key authenticates as.
*
*
* string service_account_email = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The bytes for serviceAccountEmail to set.
* @return This builder for chaining.
*/
public Builder setServiceAccountEmailBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
serviceAccountEmail_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private java.lang.Object state_ = "";
/**
*
*
*
* State of the key. One of ACTIVE, INACTIVE, or DELETED.
* Writable, can be updated by UpdateHmacKey operation.
*
*
* string state = 5;
*
* @return The state.
*/
public java.lang.String getState() {
java.lang.Object ref = state_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
state_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* State of the key. One of ACTIVE, INACTIVE, or DELETED.
* Writable, can be updated by UpdateHmacKey operation.
*
*
* string state = 5;
*
* @return The bytes for state.
*/
public com.google.protobuf.ByteString getStateBytes() {
java.lang.Object ref = state_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
state_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* State of the key. One of ACTIVE, INACTIVE, or DELETED.
* Writable, can be updated by UpdateHmacKey operation.
*
*
* string state = 5;
*
* @param value The state to set.
* @return This builder for chaining.
*/
public Builder setState(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
state_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* State of the key. One of ACTIVE, INACTIVE, or DELETED.
* Writable, can be updated by UpdateHmacKey operation.
*
*
* string state = 5;
*
* @return This builder for chaining.
*/
public Builder clearState() {
state_ = getDefaultInstance().getState();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
*
*
* State of the key. One of ACTIVE, INACTIVE, or DELETED.
* Writable, can be updated by UpdateHmacKey operation.
*
*
* string state = 5;
*
* @param value The bytes for state to set.
* @return This builder for chaining.
*/
public Builder setStateBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
state_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
private com.google.protobuf.Timestamp createTime_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
createTimeBuilder_;
/**
*
*
*
* Output only. The creation time of the HMAC key.
*
*
*
* .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the createTime field is set.
*/
public boolean hasCreateTime() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
*
*
* Output only. The creation time of the HMAC key.
*
*
*
* .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The createTime.
*/
public com.google.protobuf.Timestamp getCreateTime() {
if (createTimeBuilder_ == null) {
return createTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: createTime_;
} else {
return createTimeBuilder_.getMessage();
}
}
/**
*
*
*
* Output only. The creation time of the HMAC key.
*
*
*
* .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setCreateTime(com.google.protobuf.Timestamp value) {
if (createTimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
createTime_ = value;
} else {
createTimeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* Output only. The creation time of the HMAC key.
*
*
*
* .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
if (createTimeBuilder_ == null) {
createTime_ = builderForValue.build();
} else {
createTimeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* Output only. The creation time of the HMAC key.
*
*
*
* .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
if (createTimeBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0)
&& createTime_ != null
&& createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
getCreateTimeBuilder().mergeFrom(value);
} else {
createTime_ = value;
}
} else {
createTimeBuilder_.mergeFrom(value);
}
if (createTime_ != null) {
bitField0_ |= 0x00000020;
onChanged();
}
return this;
}
/**
*
*
*
* Output only. The creation time of the HMAC key.
*
*
*
* .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder clearCreateTime() {
bitField0_ = (bitField0_ & ~0x00000020);
createTime_ = null;
if (createTimeBuilder_ != null) {
createTimeBuilder_.dispose();
createTimeBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Output only. The creation time of the HMAC key.
*
*
*
* .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getCreateTimeFieldBuilder().getBuilder();
}
/**
*
*
*
* Output only. The creation time of the HMAC key.
*
*
*
* .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
if (createTimeBuilder_ != null) {
return createTimeBuilder_.getMessageOrBuilder();
} else {
return createTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: createTime_;
}
}
/**
*
*
*
* Output only. The creation time of the HMAC key.
*
*
*
* .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
getCreateTimeFieldBuilder() {
if (createTimeBuilder_ == null) {
createTimeBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>(
getCreateTime(), getParentForChildren(), isClean());
createTime_ = null;
}
return createTimeBuilder_;
}
private com.google.protobuf.Timestamp updateTime_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
updateTimeBuilder_;
/**
*
*
*
* Output only. The last modification time of the HMAC key metadata.
*
*
*
* .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the updateTime field is set.
*/
public boolean hasUpdateTime() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
*
*
* Output only. The last modification time of the HMAC key metadata.
*
*
*
* .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The updateTime.
*/
public com.google.protobuf.Timestamp getUpdateTime() {
if (updateTimeBuilder_ == null) {
return updateTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: updateTime_;
} else {
return updateTimeBuilder_.getMessage();
}
}
/**
*
*
*
* Output only. The last modification time of the HMAC key metadata.
*
*
*
* .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setUpdateTime(com.google.protobuf.Timestamp value) {
if (updateTimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
updateTime_ = value;
} else {
updateTimeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Output only. The last modification time of the HMAC key metadata.
*
*
*
* .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
if (updateTimeBuilder_ == null) {
updateTime_ = builderForValue.build();
} else {
updateTimeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Output only. The last modification time of the HMAC key metadata.
*
*
*
* .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) {
if (updateTimeBuilder_ == null) {
if (((bitField0_ & 0x00000040) != 0)
&& updateTime_ != null
&& updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
getUpdateTimeBuilder().mergeFrom(value);
} else {
updateTime_ = value;
}
} else {
updateTimeBuilder_.mergeFrom(value);
}
if (updateTime_ != null) {
bitField0_ |= 0x00000040;
onChanged();
}
return this;
}
/**
*
*
*
* Output only. The last modification time of the HMAC key metadata.
*
*
*
* .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder clearUpdateTime() {
bitField0_ = (bitField0_ & ~0x00000040);
updateTime_ = null;
if (updateTimeBuilder_ != null) {
updateTimeBuilder_.dispose();
updateTimeBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Output only. The last modification time of the HMAC key metadata.
*
*
*
* .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() {
bitField0_ |= 0x00000040;
onChanged();
return getUpdateTimeFieldBuilder().getBuilder();
}
/**
*
*
*
* Output only. The last modification time of the HMAC key metadata.
*
*
*
* .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
if (updateTimeBuilder_ != null) {
return updateTimeBuilder_.getMessageOrBuilder();
} else {
return updateTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: updateTime_;
}
}
/**
*
*
*
* Output only. The last modification time of the HMAC key metadata.
*
*
*
* .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
getUpdateTimeFieldBuilder() {
if (updateTimeBuilder_ == null) {
updateTimeBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>(
getUpdateTime(), getParentForChildren(), isClean());
updateTime_ = null;
}
return updateTimeBuilder_;
}
private java.lang.Object etag_ = "";
/**
*
*
*
* The etag of the HMAC key.
*
*
* string etag = 8;
*
* @return The etag.
*/
public java.lang.String getEtag() {
java.lang.Object ref = etag_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
etag_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The etag of the HMAC key.
*
*
* string etag = 8;
*
* @return The bytes for etag.
*/
public com.google.protobuf.ByteString getEtagBytes() {
java.lang.Object ref = etag_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
etag_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The etag of the HMAC key.
*
*
* string etag = 8;
*
* @param value The etag to set.
* @return This builder for chaining.
*/
public Builder setEtag(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
etag_ = value;
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* The etag of the HMAC key.
*
*
* string etag = 8;
*
* @return This builder for chaining.
*/
public Builder clearEtag() {
etag_ = getDefaultInstance().getEtag();
bitField0_ = (bitField0_ & ~0x00000080);
onChanged();
return this;
}
/**
*
*
*
* The etag of the HMAC key.
*
*
* string etag = 8;
*
* @param value The bytes for etag to set.
* @return This builder for chaining.
*/
public Builder setEtagBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
etag_ = value;
bitField0_ |= 0x00000080;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.storage.v2.HmacKeyMetadata)
}
// @@protoc_insertion_point(class_scope:google.storage.v2.HmacKeyMetadata)
private static final com.google.storage.v2.HmacKeyMetadata DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.storage.v2.HmacKeyMetadata();
}
public static com.google.storage.v2.HmacKeyMetadata getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public HmacKeyMetadata parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.storage.v2.HmacKeyMetadata getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy