@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
public Builder mergeFrom(com.google.cloud.kms.v1.KeyRing other) { if (other == com.google.cloud.kms.v1.KeyRing.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (other.hasCreateTime()) { mergeCreateTime(other.getCreateTime()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@java.lang.Override public com.google.cloud.kms.v1.KeyRing buildPartial() { com.google.cloud.kms.v1.KeyRing result = new com.google.cloud.kms.v1.KeyRing(this); result.name_ = name_; if (createTimeBuilder_ == null) { result.createTime_ = createTime_; } else { result.createTime_ = createTimeBuilder_.build(); } onBuilt(); return result; }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (createTime_ != null) { output.writeMessage(2, getCreateTime()); } unknownFields.writeTo(output); }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.kms.v1.KeyRing)) { return super.equals(obj); } com.google.cloud.kms.v1.KeyRing other = (com.google.cloud.kms.v1.KeyRing) obj; boolean result = true; result = result && getName().equals(other.getName()); result = result && (hasCreateTime() == other.hasCreateTime()); if (hasCreateTime()) { result = result && getCreateTime().equals(other.getCreateTime()); } result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); if (hasCreateTime()) { hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getCreateTime().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * * * <pre> * A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field values. * </pre> * * <code>.google.cloud.kms.v1.KeyRing key_ring = 3;</code> */ public com.google.cloud.kms.v1.KeyRing getKeyRing() { return keyRing_ == null ? com.google.cloud.kms.v1.KeyRing.getDefaultInstance() : keyRing_; } /**
/** * * * <pre> * Output only. The resource name for the [KeyRing][google.cloud.kms.v1.KeyRing] in the format * `projects/*/locations/*/keyRings/*`. * </pre> * * <code>string name = 1;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
public static void main(String... args) throws Exception { String projectId = args[0]; // The location of the Key Rings String location = args[1]; // Create the KeyManagementServiceClient using try-with-resources to manage client cleanup. try (KeyManagementServiceClient client = KeyManagementServiceClient.create()) { // The resource name of the location to search String locationPath = LocationName.format(projectId, location); // Make the RPC call ListKeyRingsPagedResponse response = client.listKeyRings(locationPath); // Iterate over all KeyRings (which may cause more result pages to be loaded automatically) for (KeyRing keyRing : response.iterateAll()) { System.out.println("Found KeyRing: " + keyRing.getName()); } } } }
/** * * * <pre> * Output only. The time at which this [KeyRing][google.cloud.kms.v1.KeyRing] was created. * </pre> * * <code>.google.protobuf.Timestamp create_time = 2;</code> */ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { return getCreateTime(); }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.kms.v1.CreateKeyRingRequest)) { return super.equals(obj); } com.google.cloud.kms.v1.CreateKeyRingRequest other = (com.google.cloud.kms.v1.CreateKeyRingRequest) obj; boolean result = true; result = result && getParent().equals(other.getParent()); result = result && getKeyRingId().equals(other.getKeyRingId()); result = result && (hasKeyRing() == other.hasKeyRing()); if (hasKeyRing()) { result = result && getKeyRing().equals(other.getKeyRing()); } result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public com.google.cloud.kms.v1.KeyRing getDefaultInstanceForType() { return com.google.cloud.kms.v1.KeyRing.getDefaultInstance(); }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); if (hasCreateTime()) { hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getCreateTime().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * * * <pre> * Output only. The resource name for the [KeyRing][google.cloud.kms.v1.KeyRing] in the format * `projects/*/locations/*/keyRings/*`. * </pre> * * <code>string name = 1;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.kms.v1.KeyRing)) { return super.equals(obj); } com.google.cloud.kms.v1.KeyRing other = (com.google.cloud.kms.v1.KeyRing) obj; boolean result = true; result = result && getName().equals(other.getName()); result = result && (hasCreateTime() == other.hasCreateTime()); if (hasCreateTime()) { result = result && getCreateTime().equals(other.getCreateTime()); } result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (createTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
/** * * * <pre> * Output only. The time at which this [KeyRing][google.cloud.kms.v1.KeyRing] was created. * </pre> * * <code>.google.protobuf.Timestamp create_time = 2;</code> */ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { return getCreateTime(); }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.kms.v1.CreateKeyRingRequest)) { return super.equals(obj); } com.google.cloud.kms.v1.CreateKeyRingRequest other = (com.google.cloud.kms.v1.CreateKeyRingRequest) obj; boolean result = true; result = result && getParent().equals(other.getParent()); result = result && getKeyRingId().equals(other.getKeyRingId()); result = result && (hasKeyRing() == other.hasKeyRing()); if (hasKeyRing()) { result = result && getKeyRing().equals(other.getKeyRing()); } result = result && unknownFields.equals(other.unknownFields); return result; }
/** * * * <pre> * A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field values. * </pre> * * <code>.google.cloud.kms.v1.KeyRing key_ring = 3;</code> */ public Builder mergeKeyRing(com.google.cloud.kms.v1.KeyRing value) { if (keyRingBuilder_ == null) { if (keyRing_ != null) { keyRing_ = com.google.cloud.kms.v1.KeyRing.newBuilder(keyRing_).mergeFrom(value).buildPartial(); } else { keyRing_ = value; } onChanged(); } else { keyRingBuilder_.mergeFrom(value); } return this; } /**
public Builder mergeFrom(com.google.cloud.kms.v1.KeyRing other) { if (other == com.google.cloud.kms.v1.KeyRing.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (other.hasCreateTime()) { mergeCreateTime(other.getCreateTime()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }