com.amazonaws.services.servicecatalog.model.DescribePortfolioSharesRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-servicecatalog Show documentation
/*
* Copyright 2019-2024 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.servicecatalog.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DescribePortfolioSharesRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The unique identifier of the portfolio for which shares will be retrieved.
*
*/
private String portfolioId;
/**
*
* The type of portfolio share to summarize. This field acts as a filter on the type of portfolio share, which can
* be one of the following:
*
*
* 1. ACCOUNT
- Represents an external account to account share.
*
*
* 2. ORGANIZATION
- Represents a share to an organization. This share is available to every account in
* the organization.
*
*
* 3. ORGANIZATIONAL_UNIT
- Represents a share to an organizational unit.
*
*
* 4. ORGANIZATION_MEMBER_ACCOUNT
- Represents a share to an account in the organization.
*
*/
private String type;
/**
*
* The page token for the next set of results. To retrieve the first set of results, use null.
*
*/
private String pageToken;
/**
*
* The maximum number of items to return with this call.
*
*/
private Integer pageSize;
/**
*
* The unique identifier of the portfolio for which shares will be retrieved.
*
*
* @param portfolioId
* The unique identifier of the portfolio for which shares will be retrieved.
*/
public void setPortfolioId(String portfolioId) {
this.portfolioId = portfolioId;
}
/**
*
* The unique identifier of the portfolio for which shares will be retrieved.
*
*
* @return The unique identifier of the portfolio for which shares will be retrieved.
*/
public String getPortfolioId() {
return this.portfolioId;
}
/**
*
* The unique identifier of the portfolio for which shares will be retrieved.
*
*
* @param portfolioId
* The unique identifier of the portfolio for which shares will be retrieved.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribePortfolioSharesRequest withPortfolioId(String portfolioId) {
setPortfolioId(portfolioId);
return this;
}
/**
*
* The type of portfolio share to summarize. This field acts as a filter on the type of portfolio share, which can
* be one of the following:
*
*
* 1. ACCOUNT
- Represents an external account to account share.
*
*
* 2. ORGANIZATION
- Represents a share to an organization. This share is available to every account in
* the organization.
*
*
* 3. ORGANIZATIONAL_UNIT
- Represents a share to an organizational unit.
*
*
* 4. ORGANIZATION_MEMBER_ACCOUNT
- Represents a share to an account in the organization.
*
*
* @param type
* The type of portfolio share to summarize. This field acts as a filter on the type of portfolio share,
* which can be one of the following:
*
* 1. ACCOUNT
- Represents an external account to account share.
*
*
* 2. ORGANIZATION
- Represents a share to an organization. This share is available to every
* account in the organization.
*
*
* 3. ORGANIZATIONAL_UNIT
- Represents a share to an organizational unit.
*
*
* 4. ORGANIZATION_MEMBER_ACCOUNT
- Represents a share to an account in the organization.
* @see DescribePortfolioShareType
*/
public void setType(String type) {
this.type = type;
}
/**
*
* The type of portfolio share to summarize. This field acts as a filter on the type of portfolio share, which can
* be one of the following:
*
*
* 1. ACCOUNT
- Represents an external account to account share.
*
*
* 2. ORGANIZATION
- Represents a share to an organization. This share is available to every account in
* the organization.
*
*
* 3. ORGANIZATIONAL_UNIT
- Represents a share to an organizational unit.
*
*
* 4. ORGANIZATION_MEMBER_ACCOUNT
- Represents a share to an account in the organization.
*
*
* @return The type of portfolio share to summarize. This field acts as a filter on the type of portfolio share,
* which can be one of the following:
*
* 1. ACCOUNT
- Represents an external account to account share.
*
*
* 2. ORGANIZATION
- Represents a share to an organization. This share is available to every
* account in the organization.
*
*
* 3. ORGANIZATIONAL_UNIT
- Represents a share to an organizational unit.
*
*
* 4. ORGANIZATION_MEMBER_ACCOUNT
- Represents a share to an account in the organization.
* @see DescribePortfolioShareType
*/
public String getType() {
return this.type;
}
/**
*
* The type of portfolio share to summarize. This field acts as a filter on the type of portfolio share, which can
* be one of the following:
*
*
* 1. ACCOUNT
- Represents an external account to account share.
*
*
* 2. ORGANIZATION
- Represents a share to an organization. This share is available to every account in
* the organization.
*
*
* 3. ORGANIZATIONAL_UNIT
- Represents a share to an organizational unit.
*
*
* 4. ORGANIZATION_MEMBER_ACCOUNT
- Represents a share to an account in the organization.
*
*
* @param type
* The type of portfolio share to summarize. This field acts as a filter on the type of portfolio share,
* which can be one of the following:
*
* 1. ACCOUNT
- Represents an external account to account share.
*
*
* 2. ORGANIZATION
- Represents a share to an organization. This share is available to every
* account in the organization.
*
*
* 3. ORGANIZATIONAL_UNIT
- Represents a share to an organizational unit.
*
*
* 4. ORGANIZATION_MEMBER_ACCOUNT
- Represents a share to an account in the organization.
* @return Returns a reference to this object so that method calls can be chained together.
* @see DescribePortfolioShareType
*/
public DescribePortfolioSharesRequest withType(String type) {
setType(type);
return this;
}
/**
*
* The type of portfolio share to summarize. This field acts as a filter on the type of portfolio share, which can
* be one of the following:
*
*
* 1. ACCOUNT
- Represents an external account to account share.
*
*
* 2. ORGANIZATION
- Represents a share to an organization. This share is available to every account in
* the organization.
*
*
* 3. ORGANIZATIONAL_UNIT
- Represents a share to an organizational unit.
*
*
* 4. ORGANIZATION_MEMBER_ACCOUNT
- Represents a share to an account in the organization.
*
*
* @param type
* The type of portfolio share to summarize. This field acts as a filter on the type of portfolio share,
* which can be one of the following:
*
* 1. ACCOUNT
- Represents an external account to account share.
*
*
* 2. ORGANIZATION
- Represents a share to an organization. This share is available to every
* account in the organization.
*
*
* 3. ORGANIZATIONAL_UNIT
- Represents a share to an organizational unit.
*
*
* 4. ORGANIZATION_MEMBER_ACCOUNT
- Represents a share to an account in the organization.
* @return Returns a reference to this object so that method calls can be chained together.
* @see DescribePortfolioShareType
*/
public DescribePortfolioSharesRequest withType(DescribePortfolioShareType type) {
this.type = type.toString();
return this;
}
/**
*
* The page token for the next set of results. To retrieve the first set of results, use null.
*
*
* @param pageToken
* The page token for the next set of results. To retrieve the first set of results, use null.
*/
public void setPageToken(String pageToken) {
this.pageToken = pageToken;
}
/**
*
* The page token for the next set of results. To retrieve the first set of results, use null.
*
*
* @return The page token for the next set of results. To retrieve the first set of results, use null.
*/
public String getPageToken() {
return this.pageToken;
}
/**
*
* The page token for the next set of results. To retrieve the first set of results, use null.
*
*
* @param pageToken
* The page token for the next set of results. To retrieve the first set of results, use null.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribePortfolioSharesRequest withPageToken(String pageToken) {
setPageToken(pageToken);
return this;
}
/**
*
* The maximum number of items to return with this call.
*
*
* @param pageSize
* The maximum number of items to return with this call.
*/
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
/**
*
* The maximum number of items to return with this call.
*
*
* @return The maximum number of items to return with this call.
*/
public Integer getPageSize() {
return this.pageSize;
}
/**
*
* The maximum number of items to return with this call.
*
*
* @param pageSize
* The maximum number of items to return with this call.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribePortfolioSharesRequest withPageSize(Integer pageSize) {
setPageSize(pageSize);
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 (getPortfolioId() != null)
sb.append("PortfolioId: ").append(getPortfolioId()).append(",");
if (getType() != null)
sb.append("Type: ").append(getType()).append(",");
if (getPageToken() != null)
sb.append("PageToken: ").append(getPageToken()).append(",");
if (getPageSize() != null)
sb.append("PageSize: ").append(getPageSize());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DescribePortfolioSharesRequest == false)
return false;
DescribePortfolioSharesRequest other = (DescribePortfolioSharesRequest) obj;
if (other.getPortfolioId() == null ^ this.getPortfolioId() == null)
return false;
if (other.getPortfolioId() != null && other.getPortfolioId().equals(this.getPortfolioId()) == false)
return false;
if (other.getType() == null ^ this.getType() == null)
return false;
if (other.getType() != null && other.getType().equals(this.getType()) == false)
return false;
if (other.getPageToken() == null ^ this.getPageToken() == null)
return false;
if (other.getPageToken() != null && other.getPageToken().equals(this.getPageToken()) == false)
return false;
if (other.getPageSize() == null ^ this.getPageSize() == null)
return false;
if (other.getPageSize() != null && other.getPageSize().equals(this.getPageSize()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getPortfolioId() == null) ? 0 : getPortfolioId().hashCode());
hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode());
hashCode = prime * hashCode + ((getPageToken() == null) ? 0 : getPageToken().hashCode());
hashCode = prime * hashCode + ((getPageSize() == null) ? 0 : getPageSize().hashCode());
return hashCode;
}
@Override
public DescribePortfolioSharesRequest clone() {
return (DescribePortfolioSharesRequest) super.clone();
}
}