/** * * * <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 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; }
@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; }
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; }
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 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 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; }
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; }