/* * 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.AmazonWebServiceRequest; /** * * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/evidently-2021-02-01/CreateProject" target="_top">AWS API * Documentation</a> */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateProjectRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** * <p> * Use this parameter if the project will use <i>client-side evaluation powered by AppConfig</i>. Client-side * evaluation allows your application to assign variations to user sessions locally instead of by calling the <a * href * ="https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_EvaluateFeature.html">EvaluateFeature * </a> operation. This mitigates the latency and availability risks that come with an API call. For more * information, see <a href= * "https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Evidently-client-side-evaluation.html" * > Client-side evaluation - powered by AppConfig.</a> * </p> * <p> * This parameter is a structure that contains information about the AppConfig application and environment that will * be used as for client-side evaluation. * </p> * <p> * To create a project that uses client-side evaluation, you must have the * <code>evidently:ExportProjectAsConfiguration</code> permission. * </p> */ private ProjectAppConfigResourceConfig appConfigResource; /** * <p> * A structure that contains information about where Evidently is to store evaluation events for longer term * storage, if you choose to do so. If you choose not to store these events, Evidently deletes them after using them * to produce metrics and other experiment results that you can view. * </p> */ private ProjectDataDeliveryConfig dataDelivery; /** * <p> * An optional description of the project. * </p> */ private String description; /** * <p> * The name for the project. * </p> */ private String name; /** * <p> * Assigns one or more tags (key-value pairs) to the project. * </p> * <p> * Tags can help you organize and categorize your resources. You can also use them to scope user permissions by * granting a user permission to access or change only resources with certain tag values. * </p> * <p> * Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of * characters. * </p> * <p> * You can associate as many as 50 tags with a project. * </p> * <p> * For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon * Web Services resources</a>. * </p> */ private java.util.Map<String, String> tags; /** * <p> * Use this parameter if the project will use <i>client-side evaluation powered by AppConfig</i>. Client-side * evaluation allows your application to assign variations to user sessions locally instead of by calling the <a * href * ="https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_EvaluateFeature.html">EvaluateFeature * </a> operation. This mitigates the latency and availability risks that come with an API call. For more * information, see <a href= * "https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Evidently-client-side-evaluation.html" * > Client-side evaluation - powered by AppConfig.</a> * </p> * <p> * This parameter is a structure that contains information about the AppConfig application and environment that will * be used as for client-side evaluation. * </p> * <p> * To create a project that uses client-side evaluation, you must have the * <code>evidently:ExportProjectAsConfiguration</code> permission. * </p> * * @param appConfigResource * Use this parameter if the project will use <i>client-side evaluation powered by AppConfig</i>. Client-side * evaluation allows your application to assign variations to user sessions locally instead of by calling the * <a href="https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_EvaluateFeature.html"> * EvaluateFeature</a> operation. This mitigates the latency and availability risks that come with an API * call. For more information, see <a href= * "https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Evidently-client-side-evaluation.html" * > Client-side evaluation - powered by AppConfig.</a> </p> * <p> * This parameter is a structure that contains information about the AppConfig application and environment * that will be used as for client-side evaluation. * </p> * <p> * To create a project that uses client-side evaluation, you must have the * <code>evidently:ExportProjectAsConfiguration</code> permission. */ public void setAppConfigResource(ProjectAppConfigResourceConfig appConfigResource) { this.appConfigResource = appConfigResource; } /** * <p> * Use this parameter if the project will use <i>client-side evaluation powered by AppConfig</i>. Client-side * evaluation allows your application to assign variations to user sessions locally instead of by calling the <a * href * ="https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_EvaluateFeature.html">EvaluateFeature * </a> operation. This mitigates the latency and availability risks that come with an API call. For more * information, see <a href= * "https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Evidently-client-side-evaluation.html" * > Client-side evaluation - powered by AppConfig.</a> * </p> * <p> * This parameter is a structure that contains information about the AppConfig application and environment that will * be used as for client-side evaluation. * </p> * <p> * To create a project that uses client-side evaluation, you must have the * <code>evidently:ExportProjectAsConfiguration</code> permission. * </p> * * @return Use this parameter if the project will use <i>client-side evaluation powered by AppConfig</i>. * Client-side evaluation allows your application to assign variations to user sessions locally instead of * by calling the <a * href="https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_EvaluateFeature.html" * >EvaluateFeature</a> operation. This mitigates the latency and availability risks that come with an API * call. For more information, see <a href= * "https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Evidently-client-side-evaluation.html" * > Client-side evaluation - powered by AppConfig.</a> </p> * <p> * This parameter is a structure that contains information about the AppConfig application and environment * that will be used as for client-side evaluation. * </p> * <p> * To create a project that uses client-side evaluation, you must have the * <code>evidently:ExportProjectAsConfiguration</code> permission. */ public ProjectAppConfigResourceConfig getAppConfigResource() { return this.appConfigResource; } /** * <p> * Use this parameter if the project will use <i>client-side evaluation powered by AppConfig</i>. Client-side * evaluation allows your application to assign variations to user sessions locally instead of by calling the <a * href * ="https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_EvaluateFeature.html">EvaluateFeature * </a> operation. This mitigates the latency and availability risks that come with an API call. For more * information, see <a href= * "https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Evidently-client-side-evaluation.html" * > Client-side evaluation - powered by AppConfig.</a> * </p> * <p> * This parameter is a structure that contains information about the AppConfig application and environment that will * be used as for client-side evaluation. * </p> * <p> * To create a project that uses client-side evaluation, you must have the * <code>evidently:ExportProjectAsConfiguration</code> permission. * </p> * * @param appConfigResource * Use this parameter if the project will use <i>client-side evaluation powered by AppConfig</i>. Client-side * evaluation allows your application to assign variations to user sessions locally instead of by calling the * <a href="https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_EvaluateFeature.html"> * EvaluateFeature</a> operation. This mitigates the latency and availability risks that come with an API * call. For more information, see <a href= * "https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Evidently-client-side-evaluation.html" * > Client-side evaluation - powered by AppConfig.</a> </p> * <p> * This parameter is a structure that contains information about the AppConfig application and environment * that will be used as for client-side evaluation. * </p> * <p> * To create a project that uses client-side evaluation, you must have the * <code>evidently:ExportProjectAsConfiguration</code> permission. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateProjectRequest withAppConfigResource(ProjectAppConfigResourceConfig appConfigResource) { setAppConfigResource(appConfigResource); return this; } /** * <p> * A structure that contains information about where Evidently is to store evaluation events for longer term * storage, if you choose to do so. If you choose not to store these events, Evidently deletes them after using them * to produce metrics and other experiment results that you can view. * </p> * * @param dataDelivery * A structure that contains information about where Evidently is to store evaluation events for longer term * storage, if you choose to do so. If you choose not to store these events, Evidently deletes them after * using them to produce metrics and other experiment results that you can view. */ public void setDataDelivery(ProjectDataDeliveryConfig dataDelivery) { this.dataDelivery = dataDelivery; } /** * <p> * A structure that contains information about where Evidently is to store evaluation events for longer term * storage, if you choose to do so. If you choose not to store these events, Evidently deletes them after using them * to produce metrics and other experiment results that you can view. * </p> * * @return A structure that contains information about where Evidently is to store evaluation events for longer term * storage, if you choose to do so. If you choose not to store these events, Evidently deletes them after * using them to produce metrics and other experiment results that you can view. */ public ProjectDataDeliveryConfig getDataDelivery() { return this.dataDelivery; } /** * <p> * A structure that contains information about where Evidently is to store evaluation events for longer term * storage, if you choose to do so. If you choose not to store these events, Evidently deletes them after using them * to produce metrics and other experiment results that you can view. * </p> * * @param dataDelivery * A structure that contains information about where Evidently is to store evaluation events for longer term * storage, if you choose to do so. If you choose not to store these events, Evidently deletes them after * using them to produce metrics and other experiment results that you can view. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateProjectRequest withDataDelivery(ProjectDataDeliveryConfig dataDelivery) { setDataDelivery(dataDelivery); return this; } /** * <p> * An optional description of the project. * </p> * * @param description * An optional description of the project. */ public void setDescription(String description) { this.description = description; } /** * <p> * An optional description of the project. * </p> * * @return An optional description of the project. */ public String getDescription() { return this.description; } /** * <p> * An optional description of the project. * </p> * * @param description * An optional description of the project. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateProjectRequest withDescription(String description) { setDescription(description); return this; } /** * <p> * The name for the project. * </p> * * @param name * The name for the project. */ public void setName(String name) { this.name = name; } /** * <p> * The name for the project. * </p> * * @return The name for the project. */ public String getName() { return this.name; } /** * <p> * The name for the project. * </p> * * @param name * The name for the project. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateProjectRequest withName(String name) { setName(name); return this; } /** * <p> * Assigns one or more tags (key-value pairs) to the project. * </p> * <p> * Tags can help you organize and categorize your resources. You can also use them to scope user permissions by * granting a user permission to access or change only resources with certain tag values. * </p> * <p> * Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of * characters. * </p> * <p> * You can associate as many as 50 tags with a project. * </p> * <p> * For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon * Web Services resources</a>. * </p> * * @return Assigns one or more tags (key-value pairs) to the project.</p> * <p> * Tags can help you organize and categorize your resources. You can also use them to scope user permissions * by granting a user permission to access or change only resources with certain tag values. * </p> * <p> * Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of * characters. * </p> * <p> * You can associate as many as 50 tags with a project. * </p> * <p> * For more information, see <a * href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services * resources</a>. */ public java.util.Map<String, String> getTags() { return tags; } /** * <p> * Assigns one or more tags (key-value pairs) to the project. * </p> * <p> * Tags can help you organize and categorize your resources. You can also use them to scope user permissions by * granting a user permission to access or change only resources with certain tag values. * </p> * <p> * Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of * characters. * </p> * <p> * You can associate as many as 50 tags with a project. * </p> * <p> * For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon * Web Services resources</a>. * </p> * * @param tags * Assigns one or more tags (key-value pairs) to the project.</p> * <p> * Tags can help you organize and categorize your resources. You can also use them to scope user permissions * by granting a user permission to access or change only resources with certain tag values. * </p> * <p> * Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of * characters. * </p> * <p> * You can associate as many as 50 tags with a project. * </p> * <p> * For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging * Amazon Web Services resources</a>. */ public void setTags(java.util.Map<String, String> tags) { this.tags = tags; } /** * <p> * Assigns one or more tags (key-value pairs) to the project. * </p> * <p> * Tags can help you organize and categorize your resources. You can also use them to scope user permissions by * granting a user permission to access or change only resources with certain tag values. * </p> * <p> * Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of * characters. * </p> * <p> * You can associate as many as 50 tags with a project. * </p> * <p> * For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon * Web Services resources</a>. * </p> * * @param tags * Assigns one or more tags (key-value pairs) to the project.</p> * <p> * Tags can help you organize and categorize your resources. You can also use them to scope user permissions * by granting a user permission to access or change only resources with certain tag values. * </p> * <p> * Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of * characters. * </p> * <p> * You can associate as many as 50 tags with a project. * </p> * <p> * For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging * Amazon Web Services resources</a>. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateProjectRequest withTags(java.util.Map<String, String> tags) { setTags(tags); return this; } /** * Add a single Tags entry * * @see CreateProjectRequest#withTags * @returns a reference to this object so that method calls can be chained together. */ public CreateProjectRequest addTagsEntry(String key, String value) { if (null == this.tags) { this.tags = new java.util.HashMap<String, String>(); } if (this.tags.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.tags.put(key, value); return this; } /** * Removes all the entries added into Tags. * * @return Returns a reference to this object so that method calls can be chained together. */ public CreateProjectRequest clearTagsEntries() { this.tags = null; 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 (getAppConfigResource() != null) sb.append("AppConfigResource: ").append(getAppConfigResource()).append(","); if (getDataDelivery() != null) sb.append("DataDelivery: ").append(getDataDelivery()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateProjectRequest == false) return false; CreateProjectRequest other = (CreateProjectRequest) obj; if (other.getAppConfigResource() == null ^ this.getAppConfigResource() == null) return false; if (other.getAppConfigResource() != null && other.getAppConfigResource().equals(this.getAppConfigResource()) == false) return false; if (other.getDataDelivery() == null ^ this.getDataDelivery() == null) return false; if (other.getDataDelivery() != null && other.getDataDelivery().equals(this.getDataDelivery()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAppConfigResource() == null) ? 0 : getAppConfigResource().hashCode()); hashCode = prime * hashCode + ((getDataDelivery() == null) ? 0 : getDataDelivery().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public CreateProjectRequest clone() { return (CreateProjectRequest) super.clone(); } }