/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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. */ package com.amazonaws.services.cloudwatchevidently.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* Use this parameter to configure client-side evaluation for your project. Client-side evaluation allows your * application to assign variations to user sessions locally instead of by calling the EvaluateFeature operation to assign the variations. This mitigates the latency and availability risks that come * with an API call. *

*

* ProjectAppConfigResource is a structure that defines the configuration of how your application * integrates with AppConfig to run client-side evaluation. *

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ProjectAppConfigResourceConfig implements Serializable, Cloneable, StructuredPojo { /** *

* The ID of the AppConfig application to use for client-side evaluation. *

*/ private String applicationId; /** *

* The ID of the AppConfig environment to use for client-side evaluation. This must be an environment that is within * the application that you specify for applicationId. *

*/ private String environmentId; /** *

* The ID of the AppConfig application to use for client-side evaluation. *

* * @param applicationId * The ID of the AppConfig application to use for client-side evaluation. */ public void setApplicationId(String applicationId) { this.applicationId = applicationId; } /** *

* The ID of the AppConfig application to use for client-side evaluation. *

* * @return The ID of the AppConfig application to use for client-side evaluation. */ public String getApplicationId() { return this.applicationId; } /** *

* The ID of the AppConfig application to use for client-side evaluation. *

* * @param applicationId * The ID of the AppConfig application to use for client-side evaluation. * @return Returns a reference to this object so that method calls can be chained together. */ public ProjectAppConfigResourceConfig withApplicationId(String applicationId) { setApplicationId(applicationId); return this; } /** *

* The ID of the AppConfig environment to use for client-side evaluation. This must be an environment that is within * the application that you specify for applicationId. *

* * @param environmentId * The ID of the AppConfig environment to use for client-side evaluation. This must be an environment that is * within the application that you specify for applicationId. */ public void setEnvironmentId(String environmentId) { this.environmentId = environmentId; } /** *

* The ID of the AppConfig environment to use for client-side evaluation. This must be an environment that is within * the application that you specify for applicationId. *

* * @return The ID of the AppConfig environment to use for client-side evaluation. This must be an environment that * is within the application that you specify for applicationId. */ public String getEnvironmentId() { return this.environmentId; } /** *

* The ID of the AppConfig environment to use for client-side evaluation. This must be an environment that is within * the application that you specify for applicationId. *

* * @param environmentId * The ID of the AppConfig environment to use for client-side evaluation. This must be an environment that is * within the application that you specify for applicationId. * @return Returns a reference to this object so that method calls can be chained together. */ public ProjectAppConfigResourceConfig withEnvironmentId(String environmentId) { setEnvironmentId(environmentId); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getApplicationId() != null) sb.append("ApplicationId: ").append(getApplicationId()).append(","); if (getEnvironmentId() != null) sb.append("EnvironmentId: ").append(getEnvironmentId()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ProjectAppConfigResourceConfig == false) return false; ProjectAppConfigResourceConfig other = (ProjectAppConfigResourceConfig) obj; if (other.getApplicationId() == null ^ this.getApplicationId() == null) return false; if (other.getApplicationId() != null && other.getApplicationId().equals(this.getApplicationId()) == false) return false; if (other.getEnvironmentId() == null ^ this.getEnvironmentId() == null) return false; if (other.getEnvironmentId() != null && other.getEnvironmentId().equals(this.getEnvironmentId()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getApplicationId() == null) ? 0 : getApplicationId().hashCode()); hashCode = prime * hashCode + ((getEnvironmentId() == null) ? 0 : getEnvironmentId().hashCode()); return hashCode; } @Override public ProjectAppConfigResourceConfig clone() { try { return (ProjectAppConfigResourceConfig) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.cloudwatchevidently.model.transform.ProjectAppConfigResourceConfigMarshaller.getInstance().marshall(this, protocolMarshaller); } }