/** * * * <pre> * The maintenance policy to be set for the cluster. An empty field * clears the existing maintenance policy. * </pre> * * <code>.google.container.v1.MaintenancePolicy maintenance_policy = 4;</code> */ public com.google.container.v1.MaintenancePolicyOrBuilder getMaintenancePolicyOrBuilder() { return getMaintenancePolicy(); }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getProjectIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); } if (!getZoneBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, zone_); } if (!getClusterIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, clusterId_); } if (maintenancePolicy_ != null) { output.writeMessage(4, getMaintenancePolicy()); } if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, name_); } unknownFields.writeTo(output); }
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getProjectIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); } if (!getZoneBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, zone_); } if (!getClusterIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, clusterId_); } if (maintenancePolicy_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getMaintenancePolicy()); } if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, name_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; hash = (53 * hash) + getProjectId().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); hash = (37 * hash) + CLUSTER_ID_FIELD_NUMBER; hash = (53 * hash) + getClusterId().hashCode(); if (hasMaintenancePolicy()) { hash = (37 * hash) + MAINTENANCE_POLICY_FIELD_NUMBER; hash = (53 * hash) + getMaintenancePolicy().hashCode(); } hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().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.container.v1.SetMaintenancePolicyRequest)) { return super.equals(obj); } com.google.container.v1.SetMaintenancePolicyRequest other = (com.google.container.v1.SetMaintenancePolicyRequest) obj; boolean result = true; result = result && getProjectId().equals(other.getProjectId()); result = result && getZone().equals(other.getZone()); result = result && getClusterId().equals(other.getClusterId()); result = result && (hasMaintenancePolicy() == other.hasMaintenancePolicy()); if (hasMaintenancePolicy()) { result = result && getMaintenancePolicy().equals(other.getMaintenancePolicy()); } result = result && getName().equals(other.getName()); result = result && unknownFields.equals(other.unknownFields); return result; }
public Builder mergeFrom(com.google.container.v1.SetMaintenancePolicyRequest other) { if (other == com.google.container.v1.SetMaintenancePolicyRequest.getDefaultInstance()) return this; if (!other.getProjectId().isEmpty()) { projectId_ = other.projectId_; onChanged(); } if (!other.getZone().isEmpty()) { zone_ = other.zone_; onChanged(); } if (!other.getClusterId().isEmpty()) { clusterId_ = other.clusterId_; onChanged(); } if (other.hasMaintenancePolicy()) { mergeMaintenancePolicy(other.getMaintenancePolicy()); } if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
Assert.assertEquals(zone, actualRequest.getZone()); Assert.assertEquals(clusterId, actualRequest.getClusterId()); Assert.assertEquals(maintenancePolicy, actualRequest.getMaintenancePolicy()); Assert.assertTrue( channelProvider.isHeaderSent(