protected override void ProcessRecord()
{
base.ProcessRecord();
var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.SiteId), MyInvocation.BoundParameters);
if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "Update-OUTPSiteAddress (UpdateSiteAddress)"))
{
return;
}
var context = new CmdletContext();
// allow for manipulation of parameters prior to loading into context
PreExecutionContextLoad(context);
#pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute
if (ParameterWasBound(nameof(this.Select)))
{
context.Select = CreateSelectDelegate<Amazon.Outposts.Model.UpdateSiteAddressResponse, UpdateOUTPSiteAddressCmdlet>(Select) ??
throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select));
if (this.PassThru.IsPresent)
{
throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select));
}
}
else if (this.PassThru.IsPresent)
{
context.Select = (response, cmdlet) => this.SiteId;
}
#pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute
context.Address_AddressLine1 = this.Address_AddressLine1;
#if MODULAR
if (this.Address_AddressLine1 == null && ParameterWasBound(nameof(this.Address_AddressLine1)))
{
WriteWarning("You are passing $null as a value for parameter Address_AddressLine1 which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues.");
}
#endif
context.Address_AddressLine2 = this.Address_AddressLine2;
context.Address_AddressLine3 = this.Address_AddressLine3;
context.Address_City = this.Address_City;
#if MODULAR
if (this.Address_City == null && ParameterWasBound(nameof(this.Address_City)))
{
WriteWarning("You are passing $null as a value for parameter Address_City which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues.");
}
#endif
context.Address_ContactName = this.Address_ContactName;
context.Address_ContactPhoneNumber = this.Address_ContactPhoneNumber;
context.Address_CountryCode = this.Address_CountryCode;
#if MODULAR
if (this.Address_CountryCode == null && ParameterWasBound(nameof(this.Address_CountryCode)))
{
WriteWarning("You are passing $null as a value for parameter Address_CountryCode which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues.");
}
#endif
context.Address_DistrictOrCounty = this.Address_DistrictOrCounty;
context.Address_Municipality = this.Address_Municipality;
context.Address_PostalCode = this.Address_PostalCode;
#if MODULAR
if (this.Address_PostalCode == null && ParameterWasBound(nameof(this.Address_PostalCode)))
{
WriteWarning("You are passing $null as a value for parameter Address_PostalCode which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues.");
}
#endif
context.Address_StateOrRegion = this.Address_StateOrRegion;
#if MODULAR
if (this.Address_StateOrRegion == null && ParameterWasBound(nameof(this.Address_StateOrRegion)))
{
WriteWarning("You are passing $null as a value for parameter Address_StateOrRegion which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues.");
}
#endif
context.AddressType = this.AddressType;
#if MODULAR
if (this.AddressType == null && ParameterWasBound(nameof(this.AddressType)))
{
WriteWarning("You are passing $null as a value for parameter AddressType which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues.");
}
#endif
context.SiteId = this.SiteId;
#if MODULAR
if (this.SiteId == null && ParameterWasBound(nameof(this.SiteId)))
{
WriteWarning("You are passing $null as a value for parameter SiteId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues.");
}
#endif
// allow further manipulation of loaded context prior to processing
PostExecutionContextLoad(context);
var output = Execute(context) as CmdletOutput;
ProcessOutput(output);
}