/* * 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.pinpoint.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* Specifies the default settings for an application. *

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

* The settings for the AWS Lambda function to invoke by default as a code hook for campaigns in the application. * You can use this hook to customize segments that are used by campaigns in the application. *

*

* To override these settings and define custom settings for a specific campaign, use the CampaignHook object of the * Campaign resource. *

*/ private CampaignHook campaignHook; /** *

* Specifies whether to enable application-related alarms in Amazon CloudWatch. *

*/ private Boolean cloudWatchMetricsEnabled; private Boolean eventTaggingEnabled; /** *

* The default sending limits for campaigns in the application. To override these limits and define custom limits * for a specific campaign or journey, use the Campaign resource or the Journey resource, respectively. *

*/ private CampaignLimits limits; /** *

* The default quiet time for campaigns in the application. Quiet time is a specific time range when messages aren't * sent to endpoints, if all the following conditions are met: *

* *

* If any of the preceding conditions isn't met, the endpoint will receive messages from a campaign or journey, even * if quiet time is enabled. *

*

* To override the default quiet time settings for a specific campaign or journey, use the Campaign resource or the Journey resource to define a custom quiet time for the * campaign or journey. *

*/ private QuietTime quietTime; /** *

* The default sending limits for journeys in the application. These limits apply to each journey for the * application but can be overridden, on a per journey basis, with the JourneyLimits resource. *

*/ private ApplicationSettingsJourneyLimits journeyLimits; /** *

* The settings for the AWS Lambda function to invoke by default as a code hook for campaigns in the application. * You can use this hook to customize segments that are used by campaigns in the application. *

*

* To override these settings and define custom settings for a specific campaign, use the CampaignHook object of the * Campaign resource. *

* * @param campaignHook * The settings for the AWS Lambda function to invoke by default as a code hook for campaigns in the * application. You can use this hook to customize segments that are used by campaigns in the * application.

*

* To override these settings and define custom settings for a specific campaign, use the CampaignHook object * of the Campaign resource. */ public void setCampaignHook(CampaignHook campaignHook) { this.campaignHook = campaignHook; } /** *

* The settings for the AWS Lambda function to invoke by default as a code hook for campaigns in the application. * You can use this hook to customize segments that are used by campaigns in the application. *

*

* To override these settings and define custom settings for a specific campaign, use the CampaignHook object of the * Campaign resource. *

* * @return The settings for the AWS Lambda function to invoke by default as a code hook for campaigns in the * application. You can use this hook to customize segments that are used by campaigns in the * application.

*

* To override these settings and define custom settings for a specific campaign, use the CampaignHook * object of the Campaign resource. */ public CampaignHook getCampaignHook() { return this.campaignHook; } /** *

* The settings for the AWS Lambda function to invoke by default as a code hook for campaigns in the application. * You can use this hook to customize segments that are used by campaigns in the application. *

*

* To override these settings and define custom settings for a specific campaign, use the CampaignHook object of the * Campaign resource. *

* * @param campaignHook * The settings for the AWS Lambda function to invoke by default as a code hook for campaigns in the * application. You can use this hook to customize segments that are used by campaigns in the * application.

*

* To override these settings and define custom settings for a specific campaign, use the CampaignHook object * of the Campaign resource. * @return Returns a reference to this object so that method calls can be chained together. */ public WriteApplicationSettingsRequest withCampaignHook(CampaignHook campaignHook) { setCampaignHook(campaignHook); return this; } /** *

* Specifies whether to enable application-related alarms in Amazon CloudWatch. *

* * @param cloudWatchMetricsEnabled * Specifies whether to enable application-related alarms in Amazon CloudWatch. */ public void setCloudWatchMetricsEnabled(Boolean cloudWatchMetricsEnabled) { this.cloudWatchMetricsEnabled = cloudWatchMetricsEnabled; } /** *

* Specifies whether to enable application-related alarms in Amazon CloudWatch. *

* * @return Specifies whether to enable application-related alarms in Amazon CloudWatch. */ public Boolean getCloudWatchMetricsEnabled() { return this.cloudWatchMetricsEnabled; } /** *

* Specifies whether to enable application-related alarms in Amazon CloudWatch. *

* * @param cloudWatchMetricsEnabled * Specifies whether to enable application-related alarms in Amazon CloudWatch. * @return Returns a reference to this object so that method calls can be chained together. */ public WriteApplicationSettingsRequest withCloudWatchMetricsEnabled(Boolean cloudWatchMetricsEnabled) { setCloudWatchMetricsEnabled(cloudWatchMetricsEnabled); return this; } /** *

* Specifies whether to enable application-related alarms in Amazon CloudWatch. *

* * @return Specifies whether to enable application-related alarms in Amazon CloudWatch. */ public Boolean isCloudWatchMetricsEnabled() { return this.cloudWatchMetricsEnabled; } /** * @param eventTaggingEnabled */ public void setEventTaggingEnabled(Boolean eventTaggingEnabled) { this.eventTaggingEnabled = eventTaggingEnabled; } /** * @return */ public Boolean getEventTaggingEnabled() { return this.eventTaggingEnabled; } /** * @param eventTaggingEnabled * @return Returns a reference to this object so that method calls can be chained together. */ public WriteApplicationSettingsRequest withEventTaggingEnabled(Boolean eventTaggingEnabled) { setEventTaggingEnabled(eventTaggingEnabled); return this; } /** * @return */ public Boolean isEventTaggingEnabled() { return this.eventTaggingEnabled; } /** *

* The default sending limits for campaigns in the application. To override these limits and define custom limits * for a specific campaign or journey, use the Campaign resource or the Journey resource, respectively. *

* * @param limits * The default sending limits for campaigns in the application. To override these limits and define custom * limits for a specific campaign or journey, use the Campaign resource or the Journey resource, respectively. */ public void setLimits(CampaignLimits limits) { this.limits = limits; } /** *

* The default sending limits for campaigns in the application. To override these limits and define custom limits * for a specific campaign or journey, use the Campaign resource or the Journey resource, respectively. *

* * @return The default sending limits for campaigns in the application. To override these limits and define custom * limits for a specific campaign or journey, use the Campaign resource or the Journey resource, respectively. */ public CampaignLimits getLimits() { return this.limits; } /** *

* The default sending limits for campaigns in the application. To override these limits and define custom limits * for a specific campaign or journey, use the Campaign resource or the Journey resource, respectively. *

* * @param limits * The default sending limits for campaigns in the application. To override these limits and define custom * limits for a specific campaign or journey, use the Campaign resource or the Journey resource, respectively. * @return Returns a reference to this object so that method calls can be chained together. */ public WriteApplicationSettingsRequest withLimits(CampaignLimits limits) { setLimits(limits); return this; } /** *

* The default quiet time for campaigns in the application. Quiet time is a specific time range when messages aren't * sent to endpoints, if all the following conditions are met: *

* *

* If any of the preceding conditions isn't met, the endpoint will receive messages from a campaign or journey, even * if quiet time is enabled. *

*

* To override the default quiet time settings for a specific campaign or journey, use the Campaign resource or the Journey resource to define a custom quiet time for the * campaign or journey. *

* * @param quietTime * The default quiet time for campaigns in the application. Quiet time is a specific time range when messages * aren't sent to endpoints, if all the following conditions are met:

* *

* If any of the preceding conditions isn't met, the endpoint will receive messages from a campaign or * journey, even if quiet time is enabled. *

*

* To override the default quiet time settings for a specific campaign or journey, use the Campaign resource or the Journey resource to define a custom quiet time * for the campaign or journey. */ public void setQuietTime(QuietTime quietTime) { this.quietTime = quietTime; } /** *

* The default quiet time for campaigns in the application. Quiet time is a specific time range when messages aren't * sent to endpoints, if all the following conditions are met: *

* *

* If any of the preceding conditions isn't met, the endpoint will receive messages from a campaign or journey, even * if quiet time is enabled. *

*

* To override the default quiet time settings for a specific campaign or journey, use the Campaign resource or the Journey resource to define a custom quiet time for the * campaign or journey. *

* * @return The default quiet time for campaigns in the application. Quiet time is a specific time range when * messages aren't sent to endpoints, if all the following conditions are met:

* *

* If any of the preceding conditions isn't met, the endpoint will receive messages from a campaign or * journey, even if quiet time is enabled. *

*

* To override the default quiet time settings for a specific campaign or journey, use the Campaign resource or the Journey resource to define a custom quiet time * for the campaign or journey. */ public QuietTime getQuietTime() { return this.quietTime; } /** *

* The default quiet time for campaigns in the application. Quiet time is a specific time range when messages aren't * sent to endpoints, if all the following conditions are met: *

* *

* If any of the preceding conditions isn't met, the endpoint will receive messages from a campaign or journey, even * if quiet time is enabled. *

*

* To override the default quiet time settings for a specific campaign or journey, use the Campaign resource or the Journey resource to define a custom quiet time for the * campaign or journey. *

* * @param quietTime * The default quiet time for campaigns in the application. Quiet time is a specific time range when messages * aren't sent to endpoints, if all the following conditions are met:

* *

* If any of the preceding conditions isn't met, the endpoint will receive messages from a campaign or * journey, even if quiet time is enabled. *

*

* To override the default quiet time settings for a specific campaign or journey, use the Campaign resource or the Journey resource to define a custom quiet time * for the campaign or journey. * @return Returns a reference to this object so that method calls can be chained together. */ public WriteApplicationSettingsRequest withQuietTime(QuietTime quietTime) { setQuietTime(quietTime); return this; } /** *

* The default sending limits for journeys in the application. These limits apply to each journey for the * application but can be overridden, on a per journey basis, with the JourneyLimits resource. *

* * @param journeyLimits * The default sending limits for journeys in the application. These limits apply to each journey for the * application but can be overridden, on a per journey basis, with the JourneyLimits resource. */ public void setJourneyLimits(ApplicationSettingsJourneyLimits journeyLimits) { this.journeyLimits = journeyLimits; } /** *

* The default sending limits for journeys in the application. These limits apply to each journey for the * application but can be overridden, on a per journey basis, with the JourneyLimits resource. *

* * @return The default sending limits for journeys in the application. These limits apply to each journey for the * application but can be overridden, on a per journey basis, with the JourneyLimits resource. */ public ApplicationSettingsJourneyLimits getJourneyLimits() { return this.journeyLimits; } /** *

* The default sending limits for journeys in the application. These limits apply to each journey for the * application but can be overridden, on a per journey basis, with the JourneyLimits resource. *

* * @param journeyLimits * The default sending limits for journeys in the application. These limits apply to each journey for the * application but can be overridden, on a per journey basis, with the JourneyLimits resource. * @return Returns a reference to this object so that method calls can be chained together. */ public WriteApplicationSettingsRequest withJourneyLimits(ApplicationSettingsJourneyLimits journeyLimits) { setJourneyLimits(journeyLimits); 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 (getCampaignHook() != null) sb.append("CampaignHook: ").append(getCampaignHook()).append(","); if (getCloudWatchMetricsEnabled() != null) sb.append("CloudWatchMetricsEnabled: ").append(getCloudWatchMetricsEnabled()).append(","); if (getEventTaggingEnabled() != null) sb.append("EventTaggingEnabled: ").append(getEventTaggingEnabled()).append(","); if (getLimits() != null) sb.append("Limits: ").append(getLimits()).append(","); if (getQuietTime() != null) sb.append("QuietTime: ").append(getQuietTime()).append(","); if (getJourneyLimits() != null) sb.append("JourneyLimits: ").append(getJourneyLimits()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof WriteApplicationSettingsRequest == false) return false; WriteApplicationSettingsRequest other = (WriteApplicationSettingsRequest) obj; if (other.getCampaignHook() == null ^ this.getCampaignHook() == null) return false; if (other.getCampaignHook() != null && other.getCampaignHook().equals(this.getCampaignHook()) == false) return false; if (other.getCloudWatchMetricsEnabled() == null ^ this.getCloudWatchMetricsEnabled() == null) return false; if (other.getCloudWatchMetricsEnabled() != null && other.getCloudWatchMetricsEnabled().equals(this.getCloudWatchMetricsEnabled()) == false) return false; if (other.getEventTaggingEnabled() == null ^ this.getEventTaggingEnabled() == null) return false; if (other.getEventTaggingEnabled() != null && other.getEventTaggingEnabled().equals(this.getEventTaggingEnabled()) == false) return false; if (other.getLimits() == null ^ this.getLimits() == null) return false; if (other.getLimits() != null && other.getLimits().equals(this.getLimits()) == false) return false; if (other.getQuietTime() == null ^ this.getQuietTime() == null) return false; if (other.getQuietTime() != null && other.getQuietTime().equals(this.getQuietTime()) == false) return false; if (other.getJourneyLimits() == null ^ this.getJourneyLimits() == null) return false; if (other.getJourneyLimits() != null && other.getJourneyLimits().equals(this.getJourneyLimits()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCampaignHook() == null) ? 0 : getCampaignHook().hashCode()); hashCode = prime * hashCode + ((getCloudWatchMetricsEnabled() == null) ? 0 : getCloudWatchMetricsEnabled().hashCode()); hashCode = prime * hashCode + ((getEventTaggingEnabled() == null) ? 0 : getEventTaggingEnabled().hashCode()); hashCode = prime * hashCode + ((getLimits() == null) ? 0 : getLimits().hashCode()); hashCode = prime * hashCode + ((getQuietTime() == null) ? 0 : getQuietTime().hashCode()); hashCode = prime * hashCode + ((getJourneyLimits() == null) ? 0 : getJourneyLimits().hashCode()); return hashCode; } @Override public WriteApplicationSettingsRequest clone() { try { return (WriteApplicationSettingsRequest) 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.pinpoint.model.transform.WriteApplicationSettingsRequestMarshaller.getInstance().marshall(this, protocolMarshaller); } }