/* * 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.iotfleetwise.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Information about a campaign. *
** You can use the API operation to return this information about multiple created campaigns. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CampaignSummary implements Serializable, Cloneable, StructuredPojo { /** ** The Amazon Resource Name (ARN) of a campaign. *
*/ private String arn; /** ** The name of a campaign. *
*/ private String name; /** ** The description of the campaign. *
*/ private String description; /** ** The ARN of the signal catalog associated with the campaign. *
*/ private String signalCatalogArn; /** ** The ARN of a vehicle or fleet to which the campaign is deployed. *
*/ private String targetArn; /** ** The state of a campaign. The status can be one of the following: *
*
* CREATING
- Amazon Web Services IoT FleetWise is processing your request to create the campaign.
*
* WAITING_FOR_APPROVAL
- After a campaign is created, it enters the WAITING_FOR_APPROVAL
* state. To allow Amazon Web Services IoT FleetWise to deploy the campaign to the target vehicle or fleet, use the
* API operation to approve the campaign.
*
* RUNNING
- The campaign is active.
*
* SUSPENDED
- The campaign is suspended. To resume the campaign, use the API operation.
*
* The time the campaign was created. *
*/ private java.util.Date creationTime; /** ** The last time the campaign was modified. *
*/ private java.util.Date lastModificationTime; /** ** The Amazon Resource Name (ARN) of a campaign. *
* * @param arn * The Amazon Resource Name (ARN) of a campaign. */ public void setArn(String arn) { this.arn = arn; } /** ** The Amazon Resource Name (ARN) of a campaign. *
* * @return The Amazon Resource Name (ARN) of a campaign. */ public String getArn() { return this.arn; } /** ** The Amazon Resource Name (ARN) of a campaign. *
* * @param arn * The Amazon Resource Name (ARN) of a campaign. * @return Returns a reference to this object so that method calls can be chained together. */ public CampaignSummary withArn(String arn) { setArn(arn); return this; } /** ** The name of a campaign. *
* * @param name * The name of a campaign. */ public void setName(String name) { this.name = name; } /** ** The name of a campaign. *
* * @return The name of a campaign. */ public String getName() { return this.name; } /** ** The name of a campaign. *
* * @param name * The name of a campaign. * @return Returns a reference to this object so that method calls can be chained together. */ public CampaignSummary withName(String name) { setName(name); return this; } /** ** The description of the campaign. *
* * @param description * The description of the campaign. */ public void setDescription(String description) { this.description = description; } /** ** The description of the campaign. *
* * @return The description of the campaign. */ public String getDescription() { return this.description; } /** ** The description of the campaign. *
* * @param description * The description of the campaign. * @return Returns a reference to this object so that method calls can be chained together. */ public CampaignSummary withDescription(String description) { setDescription(description); return this; } /** ** The ARN of the signal catalog associated with the campaign. *
* * @param signalCatalogArn * The ARN of the signal catalog associated with the campaign. */ public void setSignalCatalogArn(String signalCatalogArn) { this.signalCatalogArn = signalCatalogArn; } /** ** The ARN of the signal catalog associated with the campaign. *
* * @return The ARN of the signal catalog associated with the campaign. */ public String getSignalCatalogArn() { return this.signalCatalogArn; } /** ** The ARN of the signal catalog associated with the campaign. *
* * @param signalCatalogArn * The ARN of the signal catalog associated with the campaign. * @return Returns a reference to this object so that method calls can be chained together. */ public CampaignSummary withSignalCatalogArn(String signalCatalogArn) { setSignalCatalogArn(signalCatalogArn); return this; } /** ** The ARN of a vehicle or fleet to which the campaign is deployed. *
* * @param targetArn * The ARN of a vehicle or fleet to which the campaign is deployed. */ public void setTargetArn(String targetArn) { this.targetArn = targetArn; } /** ** The ARN of a vehicle or fleet to which the campaign is deployed. *
* * @return The ARN of a vehicle or fleet to which the campaign is deployed. */ public String getTargetArn() { return this.targetArn; } /** ** The ARN of a vehicle or fleet to which the campaign is deployed. *
* * @param targetArn * The ARN of a vehicle or fleet to which the campaign is deployed. * @return Returns a reference to this object so that method calls can be chained together. */ public CampaignSummary withTargetArn(String targetArn) { setTargetArn(targetArn); return this; } /** ** The state of a campaign. The status can be one of the following: *
*
* CREATING
- Amazon Web Services IoT FleetWise is processing your request to create the campaign.
*
* WAITING_FOR_APPROVAL
- After a campaign is created, it enters the WAITING_FOR_APPROVAL
* state. To allow Amazon Web Services IoT FleetWise to deploy the campaign to the target vehicle or fleet, use the
* API operation to approve the campaign.
*
* RUNNING
- The campaign is active.
*
* SUSPENDED
- The campaign is suspended. To resume the campaign, use the API operation.
*
* CREATING
- Amazon Web Services IoT FleetWise is processing your request to create the
* campaign.
*
* WAITING_FOR_APPROVAL
- After a campaign is created, it enters the
* WAITING_FOR_APPROVAL
state. To allow Amazon Web Services IoT FleetWise to deploy the campaign
* to the target vehicle or fleet, use the API operation to approve the campaign.
*
* RUNNING
- The campaign is active.
*
* SUSPENDED
- The campaign is suspended. To resume the campaign, use the API operation.
*
* The state of a campaign. The status can be one of the following: *
*
* CREATING
- Amazon Web Services IoT FleetWise is processing your request to create the campaign.
*
* WAITING_FOR_APPROVAL
- After a campaign is created, it enters the WAITING_FOR_APPROVAL
* state. To allow Amazon Web Services IoT FleetWise to deploy the campaign to the target vehicle or fleet, use the
* API operation to approve the campaign.
*
* RUNNING
- The campaign is active.
*
* SUSPENDED
- The campaign is suspended. To resume the campaign, use the API operation.
*
* CREATING
- Amazon Web Services IoT FleetWise is processing your request to create the
* campaign.
*
* WAITING_FOR_APPROVAL
- After a campaign is created, it enters the
* WAITING_FOR_APPROVAL
state. To allow Amazon Web Services IoT FleetWise to deploy the
* campaign to the target vehicle or fleet, use the API operation to approve the campaign.
*
* RUNNING
- The campaign is active.
*
* SUSPENDED
- The campaign is suspended. To resume the campaign, use the API operation.
*
* The state of a campaign. The status can be one of the following: *
*
* CREATING
- Amazon Web Services IoT FleetWise is processing your request to create the campaign.
*
* WAITING_FOR_APPROVAL
- After a campaign is created, it enters the WAITING_FOR_APPROVAL
* state. To allow Amazon Web Services IoT FleetWise to deploy the campaign to the target vehicle or fleet, use the
* API operation to approve the campaign.
*
* RUNNING
- The campaign is active.
*
* SUSPENDED
- The campaign is suspended. To resume the campaign, use the API operation.
*
* CREATING
- Amazon Web Services IoT FleetWise is processing your request to create the
* campaign.
*
* WAITING_FOR_APPROVAL
- After a campaign is created, it enters the
* WAITING_FOR_APPROVAL
state. To allow Amazon Web Services IoT FleetWise to deploy the campaign
* to the target vehicle or fleet, use the API operation to approve the campaign.
*
* RUNNING
- The campaign is active.
*
* SUSPENDED
- The campaign is suspended. To resume the campaign, use the API operation.
*
* The state of a campaign. The status can be one of the following: *
*
* CREATING
- Amazon Web Services IoT FleetWise is processing your request to create the campaign.
*
* WAITING_FOR_APPROVAL
- After a campaign is created, it enters the WAITING_FOR_APPROVAL
* state. To allow Amazon Web Services IoT FleetWise to deploy the campaign to the target vehicle or fleet, use the
* API operation to approve the campaign.
*
* RUNNING
- The campaign is active.
*
* SUSPENDED
- The campaign is suspended. To resume the campaign, use the API operation.
*
* CREATING
- Amazon Web Services IoT FleetWise is processing your request to create the
* campaign.
*
* WAITING_FOR_APPROVAL
- After a campaign is created, it enters the
* WAITING_FOR_APPROVAL
state. To allow Amazon Web Services IoT FleetWise to deploy the campaign
* to the target vehicle or fleet, use the API operation to approve the campaign.
*
* RUNNING
- The campaign is active.
*
* SUSPENDED
- The campaign is suspended. To resume the campaign, use the API operation.
*
* The time the campaign was created. *
* * @param creationTime * The time the campaign was created. */ public void setCreationTime(java.util.Date creationTime) { this.creationTime = creationTime; } /** ** The time the campaign was created. *
* * @return The time the campaign was created. */ public java.util.Date getCreationTime() { return this.creationTime; } /** ** The time the campaign was created. *
* * @param creationTime * The time the campaign was created. * @return Returns a reference to this object so that method calls can be chained together. */ public CampaignSummary withCreationTime(java.util.Date creationTime) { setCreationTime(creationTime); return this; } /** ** The last time the campaign was modified. *
* * @param lastModificationTime * The last time the campaign was modified. */ public void setLastModificationTime(java.util.Date lastModificationTime) { this.lastModificationTime = lastModificationTime; } /** ** The last time the campaign was modified. *
* * @return The last time the campaign was modified. */ public java.util.Date getLastModificationTime() { return this.lastModificationTime; } /** ** The last time the campaign was modified. *
* * @param lastModificationTime * The last time the campaign was modified. * @return Returns a reference to this object so that method calls can be chained together. */ public CampaignSummary withLastModificationTime(java.util.Date lastModificationTime) { setLastModificationTime(lastModificationTime); 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 (getArn() != null) sb.append("Arn: ").append(getArn()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getSignalCatalogArn() != null) sb.append("SignalCatalogArn: ").append(getSignalCatalogArn()).append(","); if (getTargetArn() != null) sb.append("TargetArn: ").append(getTargetArn()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getCreationTime() != null) sb.append("CreationTime: ").append(getCreationTime()).append(","); if (getLastModificationTime() != null) sb.append("LastModificationTime: ").append(getLastModificationTime()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CampaignSummary == false) return false; CampaignSummary other = (CampaignSummary) obj; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == 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.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getSignalCatalogArn() == null ^ this.getSignalCatalogArn() == null) return false; if (other.getSignalCatalogArn() != null && other.getSignalCatalogArn().equals(this.getSignalCatalogArn()) == false) return false; if (other.getTargetArn() == null ^ this.getTargetArn() == null) return false; if (other.getTargetArn() != null && other.getTargetArn().equals(this.getTargetArn()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getCreationTime() == null ^ this.getCreationTime() == null) return false; if (other.getCreationTime() != null && other.getCreationTime().equals(this.getCreationTime()) == false) return false; if (other.getLastModificationTime() == null ^ this.getLastModificationTime() == null) return false; if (other.getLastModificationTime() != null && other.getLastModificationTime().equals(this.getLastModificationTime()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getSignalCatalogArn() == null) ? 0 : getSignalCatalogArn().hashCode()); hashCode = prime * hashCode + ((getTargetArn() == null) ? 0 : getTargetArn().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode()); hashCode = prime * hashCode + ((getLastModificationTime() == null) ? 0 : getLastModificationTime().hashCode()); return hashCode; } @Override public CampaignSummary clone() { try { return (CampaignSummary) 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.iotfleetwise.model.transform.CampaignSummaryMarshaller.getInstance().marshall(this, protocolMarshaller); } }