/*
* Copyright 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.
*/
/*
* Do not modify this file. This file is generated from the codeartifact-2018-09-22.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CodeArtifact.Model
{
///
/// Container for the parameters to the PublishPackageVersion operation.
/// Creates a new package version containing one or more assets (or files).
///
///
///
/// The unfinished
flag can be used to keep the package version in the Unfinished
/// state until all of its assets have been uploaded (see Package
/// version status in the CodeArtifact user guide). To set the package version’s
/// status to Published
, omit the unfinished
flag when uploading
/// the final asset, or set the status using UpdatePackageVersionStatus.
/// Once a package version’s status is set to Published
, it cannot change
/// back to Unfinished
.
///
///
///
/// Only generic packages can be published using this API. For more information, see Using
/// generic packages in the CodeArtifact User Guide.
///
///
///
public partial class PublishPackageVersionRequest : AmazonCodeArtifactRequest
{
private Stream _assetContent;
private string _assetName;
private string _assetsha256;
private string _domain;
private string _domainOwner;
private PackageFormat _format;
private string _awsNamespace;
private string _package;
private string _packageVersion;
private string _repository;
private bool? _unfinished;
///
/// Gets and sets the property AssetContent.
///
/// The content of the asset to publish.
///
///
[AWSProperty(Required=true)]
public Stream AssetContent
{
get { return this._assetContent; }
set { this._assetContent = value; }
}
// Check to see if AssetContent property is set
internal bool IsSetAssetContent()
{
return this._assetContent != null;
}
///
/// Gets and sets the property AssetName.
///
/// The name of the asset to publish. Asset names can include Unicode letters and numbers,
/// and the following special characters: ~ ! @ ^ & ( ) - ` _ + [ ] { } ; ,
/// . `
///
///
[AWSProperty(Required=true, Min=1, Max=255)]
public string AssetName
{
get { return this._assetName; }
set { this._assetName = value; }
}
// Check to see if AssetName property is set
internal bool IsSetAssetName()
{
return this._assetName != null;
}
///
/// Gets and sets the property AssetSHA256.
///
/// The SHA256 hash of the assetContent
to publish. This value must be calculated
/// by the caller and provided with the request (see Publishing
/// a generic package in the CodeArtifact User Guide).
///
///
///
/// This value is used as an integrity check to verify that the assetContent
/// has not changed after it was originally sent.
///
///
[AWSProperty(Required=true, Min=64, Max=64)]
public string AssetSHA256
{
get { return this._assetsha256; }
set { this._assetsha256 = value; }
}
// Check to see if AssetSHA256 property is set
internal bool IsSetAssetSHA256()
{
return this._assetsha256 != null;
}
///
/// Gets and sets the property Domain.
///
/// The name of the domain that contains the repository that contains the package version
/// to publish.
///
///
[AWSProperty(Required=true, Min=2, Max=50)]
public string Domain
{
get { return this._domain; }
set { this._domain = value; }
}
// Check to see if Domain property is set
internal bool IsSetDomain()
{
return this._domain != null;
}
///
/// Gets and sets the property DomainOwner.
///
/// The 12-digit account number of the AWS account that owns the domain. It does not include
/// dashes or spaces.
///
///
[AWSProperty(Min=12, Max=12)]
public string DomainOwner
{
get { return this._domainOwner; }
set { this._domainOwner = value; }
}
// Check to see if DomainOwner property is set
internal bool IsSetDomainOwner()
{
return this._domainOwner != null;
}
///
/// Gets and sets the property Format.
///
/// A format that specifies the type of the package version with the requested asset file.
///
///
///
/// The only supported value is generic
.
///
///
[AWSProperty(Required=true)]
public PackageFormat Format
{
get { return this._format; }
set { this._format = value; }
}
// Check to see if Format property is set
internal bool IsSetFormat()
{
return this._format != null;
}
///
/// Gets and sets the property Namespace.
///
/// The namespace of the package version to publish.
///
///
[AWSProperty(Min=1, Max=255)]
public string Namespace
{
get { return this._awsNamespace; }
set { this._awsNamespace = value; }
}
// Check to see if Namespace property is set
internal bool IsSetNamespace()
{
return this._awsNamespace != null;
}
///
/// Gets and sets the property Package.
///
/// The name of the package version to publish.
///
///
[AWSProperty(Required=true, Min=1, Max=255)]
public string Package
{
get { return this._package; }
set { this._package = value; }
}
// Check to see if Package property is set
internal bool IsSetPackage()
{
return this._package != null;
}
///
/// Gets and sets the property PackageVersion.
///
/// The package version to publish (for example, 3.5.2
).
///
///
[AWSProperty(Required=true, Min=1, Max=255)]
public string PackageVersion
{
get { return this._packageVersion; }
set { this._packageVersion = value; }
}
// Check to see if PackageVersion property is set
internal bool IsSetPackageVersion()
{
return this._packageVersion != null;
}
///
/// Gets and sets the property Repository.
///
/// The name of the repository that the package version will be published to.
///
///
[AWSProperty(Required=true, Min=2, Max=100)]
public string Repository
{
get { return this._repository; }
set { this._repository = value; }
}
// Check to see if Repository property is set
internal bool IsSetRepository()
{
return this._repository != null;
}
///
/// Gets and sets the property Unfinished.
///
/// Specifies whether the package version should remain in the unfinished
/// state. If omitted, the package version status will be set to Published
/// (see Package
/// version status in the CodeArtifact User Guide).
///
///
///
/// Valid values: unfinished
///
///
public bool Unfinished
{
get { return this._unfinished.GetValueOrDefault(); }
set { this._unfinished = value; }
}
// Check to see if Unfinished property is set
internal bool IsSetUnfinished()
{
return this._unfinished.HasValue;
}
}
}