diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/OrbitalManager.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/OrbitalManager.java deleted file mode 100644 index 75d496f88d9a..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/OrbitalManager.java +++ /dev/null @@ -1,356 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital; - -import com.azure.core.credential.TokenCredential; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.HttpPipelinePosition; -import com.azure.core.http.policy.AddDatePolicy; -import com.azure.core.http.policy.AddHeadersFromContextPolicy; -import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; -import com.azure.core.http.policy.HttpLogOptions; -import com.azure.core.http.policy.HttpLoggingPolicy; -import com.azure.core.http.policy.HttpPipelinePolicy; -import com.azure.core.http.policy.HttpPolicyProviders; -import com.azure.core.http.policy.RequestIdPolicy; -import com.azure.core.http.policy.RetryOptions; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Configuration; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.orbital.fluent.AzureOrbital; -import com.azure.resourcemanager.orbital.implementation.AvailableGroundStationsImpl; -import com.azure.resourcemanager.orbital.implementation.AzureOrbitalBuilder; -import com.azure.resourcemanager.orbital.implementation.ContactProfilesImpl; -import com.azure.resourcemanager.orbital.implementation.ContactsImpl; -import com.azure.resourcemanager.orbital.implementation.OperationsImpl; -import com.azure.resourcemanager.orbital.implementation.OperationsResultsImpl; -import com.azure.resourcemanager.orbital.implementation.SpacecraftsImpl; -import com.azure.resourcemanager.orbital.models.AvailableGroundStations; -import com.azure.resourcemanager.orbital.models.ContactProfiles; -import com.azure.resourcemanager.orbital.models.Contacts; -import com.azure.resourcemanager.orbital.models.Operations; -import com.azure.resourcemanager.orbital.models.OperationsResults; -import com.azure.resourcemanager.orbital.models.Spacecrafts; -import java.time.Duration; -import java.time.temporal.ChronoUnit; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; -import java.util.stream.Collectors; - -/** - * Entry point to OrbitalManager. - * Azure Orbital service. - */ -public final class OrbitalManager { - private Operations operations; - - private Spacecrafts spacecrafts; - - private Contacts contacts; - - private ContactProfiles contactProfiles; - - private AvailableGroundStations availableGroundStations; - - private OperationsResults operationsResults; - - private final AzureOrbital clientObject; - - private OrbitalManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = new AzureOrbitalBuilder().pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); - } - - /** - * Creates an instance of orbital service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the orbital service API instance. - */ - public static OrbitalManager authenticate(TokenCredential credential, AzureProfile profile) { - Objects.requireNonNull(credential, "'credential' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - return configure().authenticate(credential, profile); - } - - /** - * Creates an instance of orbital service API entry point. - * - * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. - * @param profile the Azure profile for client. - * @return the orbital service API instance. - */ - public static OrbitalManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - return new OrbitalManager(httpPipeline, profile, null); - } - - /** - * Gets a Configurable instance that can be used to create OrbitalManager with optional configuration. - * - * @return the Configurable instance allowing configurations. - */ - public static Configurable configure() { - return new OrbitalManager.Configurable(); - } - - /** - * The Configurable allowing configurations to be set. - */ - public static final class Configurable { - private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); - - private HttpClient httpClient; - private HttpLogOptions httpLogOptions; - private final List policies = new ArrayList<>(); - private final List scopes = new ArrayList<>(); - private RetryPolicy retryPolicy; - private RetryOptions retryOptions; - private Duration defaultPollInterval; - - private Configurable() { - } - - /** - * Sets the http client. - * - * @param httpClient the HTTP client. - * @return the configurable object itself. - */ - public Configurable withHttpClient(HttpClient httpClient) { - this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null."); - return this; - } - - /** - * Sets the logging options to the HTTP pipeline. - * - * @param httpLogOptions the HTTP log options. - * @return the configurable object itself. - */ - public Configurable withLogOptions(HttpLogOptions httpLogOptions) { - this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null."); - return this; - } - - /** - * Adds the pipeline policy to the HTTP pipeline. - * - * @param policy the HTTP pipeline policy. - * @return the configurable object itself. - */ - public Configurable withPolicy(HttpPipelinePolicy policy) { - this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null.")); - return this; - } - - /** - * Adds the scope to permission sets. - * - * @param scope the scope. - * @return the configurable object itself. - */ - public Configurable withScope(String scope) { - this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); - return this; - } - - /** - * Sets the retry policy to the HTTP pipeline. - * - * @param retryPolicy the HTTP pipeline retry policy. - * @return the configurable object itself. - */ - public Configurable withRetryPolicy(RetryPolicy retryPolicy) { - this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null."); - return this; - } - - /** - * Sets the retry options for the HTTP pipeline retry policy. - *

- * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. - * - * @param retryOptions the retry options for the HTTP pipeline retry policy. - * @return the configurable object itself. - */ - public Configurable withRetryOptions(RetryOptions retryOptions) { - this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); - return this; - } - - /** - * Sets the default poll interval, used when service does not provide "Retry-After" header. - * - * @param defaultPollInterval the default poll interval. - * @return the configurable object itself. - */ - public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval - = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); - if (this.defaultPollInterval.isNegative()) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); - } - return this; - } - - /** - * Creates an instance of orbital service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the orbital service API instance. - */ - public OrbitalManager authenticate(TokenCredential credential, AzureProfile profile) { - Objects.requireNonNull(credential, "'credential' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - - StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder.append("azsdk-java") - .append("-") - .append("com.azure.resourcemanager.orbital") - .append("/") - .append("1.0.0"); - if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder.append(" (") - .append(Configuration.getGlobalConfiguration().get("java.version")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.name")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.version")) - .append("; auto-generated)"); - } else { - userAgentBuilder.append(" (auto-generated)"); - } - - if (scopes.isEmpty()) { - scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); - } - if (retryPolicy == null) { - if (retryOptions != null) { - retryPolicy = new RetryPolicy(retryOptions); - } else { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); - } - } - List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(userAgentBuilder.toString())); - policies.add(new AddHeadersFromContextPolicy()); - policies.add(new RequestIdPolicy()); - policies.addAll(this.policies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); - HttpPolicyProviders.addBeforeRetryPolicies(policies); - policies.add(retryPolicy); - policies.add(new AddDatePolicy()); - policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies.addAll(this.policies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); - HttpPolicyProviders.addAfterRetryPolicies(policies); - policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); - return new OrbitalManager(httpPipeline, profile, defaultPollInterval); - } - } - - /** - * Gets the resource collection API of Operations. - * - * @return Resource collection API of Operations. - */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - - /** - * Gets the resource collection API of Spacecrafts. It manages Spacecraft. - * - * @return Resource collection API of Spacecrafts. - */ - public Spacecrafts spacecrafts() { - if (this.spacecrafts == null) { - this.spacecrafts = new SpacecraftsImpl(clientObject.getSpacecrafts(), this); - } - return spacecrafts; - } - - /** - * Gets the resource collection API of Contacts. It manages Contact. - * - * @return Resource collection API of Contacts. - */ - public Contacts contacts() { - if (this.contacts == null) { - this.contacts = new ContactsImpl(clientObject.getContacts(), this); - } - return contacts; - } - - /** - * Gets the resource collection API of ContactProfiles. It manages ContactProfile. - * - * @return Resource collection API of ContactProfiles. - */ - public ContactProfiles contactProfiles() { - if (this.contactProfiles == null) { - this.contactProfiles = new ContactProfilesImpl(clientObject.getContactProfiles(), this); - } - return contactProfiles; - } - - /** - * Gets the resource collection API of AvailableGroundStations. - * - * @return Resource collection API of AvailableGroundStations. - */ - public AvailableGroundStations availableGroundStations() { - if (this.availableGroundStations == null) { - this.availableGroundStations - = new AvailableGroundStationsImpl(clientObject.getAvailableGroundStations(), this); - } - return availableGroundStations; - } - - /** - * Gets the resource collection API of OperationsResults. - * - * @return Resource collection API of OperationsResults. - */ - public OperationsResults operationsResults() { - if (this.operationsResults == null) { - this.operationsResults = new OperationsResultsImpl(clientObject.getOperationsResults(), this); - } - return operationsResults; - } - - /** - * Gets wrapped service client AzureOrbital providing direct access to the underlying auto-generated API - * implementation, based on Azure REST API. - * - * @return Wrapped service client AzureOrbital. - */ - public AzureOrbital serviceClient() { - return this.clientObject; - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/AvailableGroundStationsClient.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/AvailableGroundStationsClient.java deleted file mode 100644 index 45b5ed88fc91..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/AvailableGroundStationsClient.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.orbital.fluent.models.AvailableGroundStationInner; -import com.azure.resourcemanager.orbital.models.CapabilityParameter; - -/** - * An instance of this class provides access to all the operations defined in AvailableGroundStationsClient. - */ -public interface AvailableGroundStationsClient { - /** - * Returns list of available ground stations. - * - * @param capability Ground Station Capability. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the AvailableGroundStations API service call as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(CapabilityParameter capability); - - /** - * Returns list of available ground stations. - * - * @param capability Ground Station Capability. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the AvailableGroundStations API service call as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(CapabilityParameter capability, Context context); -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/AzureOrbital.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/AzureOrbital.java deleted file mode 100644 index 18379ac26030..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/AzureOrbital.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.fluent; - -import com.azure.core.http.HttpPipeline; -import java.time.Duration; - -/** - * The interface for AzureOrbital class. - */ -public interface AzureOrbital { - /** - * Gets The ID of the target subscription. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. - * - * @return the endpoint value. - */ - String getEndpoint(); - - /** - * Gets Api Version. - * - * @return the apiVersion value. - */ - String getApiVersion(); - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - HttpPipeline getHttpPipeline(); - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - Duration getDefaultPollInterval(); - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - - /** - * Gets the SpacecraftsClient object to access its operations. - * - * @return the SpacecraftsClient object. - */ - SpacecraftsClient getSpacecrafts(); - - /** - * Gets the ContactsClient object to access its operations. - * - * @return the ContactsClient object. - */ - ContactsClient getContacts(); - - /** - * Gets the ContactProfilesClient object to access its operations. - * - * @return the ContactProfilesClient object. - */ - ContactProfilesClient getContactProfiles(); - - /** - * Gets the AvailableGroundStationsClient object to access its operations. - * - * @return the AvailableGroundStationsClient object. - */ - AvailableGroundStationsClient getAvailableGroundStations(); - - /** - * Gets the OperationsResultsClient object to access its operations. - * - * @return the OperationsResultsClient object. - */ - OperationsResultsClient getOperationsResults(); -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/ContactProfilesClient.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/ContactProfilesClient.java deleted file mode 100644 index 75105bf82da0..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/ContactProfilesClient.java +++ /dev/null @@ -1,287 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.orbital.fluent.models.ContactProfileInner; -import com.azure.resourcemanager.orbital.models.TagsObject; - -/** - * An instance of this class provides access to all the operations defined in ContactProfilesClient. - */ -public interface ContactProfilesClient { - /** - * Gets the specified contact Profile in a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified contact Profile in a specified resource group along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String contactProfileName, - Context context); - - /** - * Gets the specified contact Profile in a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified contact Profile in a specified resource group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContactProfileInner getByResourceGroup(String resourceGroupName, String contactProfileName); - - /** - * Creates or updates a contact profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters The parameters to provide for the created Contact Profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of customer creates a Contact Profile Resource, which will contain all - * of the configurations required for scheduling a contact. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ContactProfileInner> beginCreateOrUpdate(String resourceGroupName, - String contactProfileName, ContactProfileInner parameters); - - /** - * Creates or updates a contact profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters The parameters to provide for the created Contact Profile. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of customer creates a Contact Profile Resource, which will contain all - * of the configurations required for scheduling a contact. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ContactProfileInner> beginCreateOrUpdate(String resourceGroupName, - String contactProfileName, ContactProfileInner parameters, Context context); - - /** - * Creates or updates a contact profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters The parameters to provide for the created Contact Profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a Contact Profile Resource, which will contain all of the configurations required for - * scheduling a contact. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContactProfileInner createOrUpdate(String resourceGroupName, String contactProfileName, - ContactProfileInner parameters); - - /** - * Creates or updates a contact profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters The parameters to provide for the created Contact Profile. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a Contact Profile Resource, which will contain all of the configurations required for - * scheduling a contact. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContactProfileInner createOrUpdate(String resourceGroupName, String contactProfileName, - ContactProfileInner parameters, Context context); - - /** - * Deletes a specified contact profile resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String contactProfileName); - - /** - * Deletes a specified contact profile resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String contactProfileName, - Context context); - - /** - * Deletes a specified contact profile resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String contactProfileName); - - /** - * Deletes a specified contact profile resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String contactProfileName, Context context); - - /** - * Updates the specified contact profile tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters Parameters supplied to update contact profile tags. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of customer creates a Contact Profile Resource, which will contain all - * of the configurations required for scheduling a contact. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ContactProfileInner> beginUpdateTags(String resourceGroupName, - String contactProfileName, TagsObject parameters); - - /** - * Updates the specified contact profile tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters Parameters supplied to update contact profile tags. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of customer creates a Contact Profile Resource, which will contain all - * of the configurations required for scheduling a contact. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ContactProfileInner> beginUpdateTags(String resourceGroupName, - String contactProfileName, TagsObject parameters, Context context); - - /** - * Updates the specified contact profile tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters Parameters supplied to update contact profile tags. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a Contact Profile Resource, which will contain all of the configurations required for - * scheduling a contact. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContactProfileInner updateTags(String resourceGroupName, String contactProfileName, TagsObject parameters); - - /** - * Updates the specified contact profile tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters Parameters supplied to update contact profile tags. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a Contact Profile Resource, which will contain all of the configurations required for - * scheduling a contact. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContactProfileInner updateTags(String resourceGroupName, String contactProfileName, TagsObject parameters, - Context context); - - /** - * Returns list of contact profiles by Subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Returns list of contact profiles by Subscription. - * - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String skiptoken, Context context); - - /** - * Returns list of contact profiles by Resource Group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Returns list of contact profiles by Resource Group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, String skiptoken, Context context); -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/ContactsClient.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/ContactsClient.java deleted file mode 100644 index 62da51f9e558..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/ContactsClient.java +++ /dev/null @@ -1,203 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.orbital.fluent.models.ContactInner; - -/** - * An instance of this class provides access to all the operations defined in ContactsClient. - */ -public interface ContactsClient { - /** - * Returns list of contacts by spacecraftName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContacts API service call as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String spacecraftName); - - /** - * Returns list of contacts by spacecraftName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContacts API service call as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String spacecraftName, String skiptoken, - Context context); - - /** - * Gets the specified contact in a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified contact in a specified resource group along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String spacecraftName, String contactName, - Context context); - - /** - * Gets the specified contact in a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified contact in a specified resource group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContactInner get(String resourceGroupName, String spacecraftName, String contactName); - - /** - * Creates a contact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @param parameters The parameters to provide for the created contact. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of customer creates a contact resource for a spacecraft resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ContactInner> beginCreate(String resourceGroupName, String spacecraftName, - String contactName, ContactInner parameters); - - /** - * Creates a contact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @param parameters The parameters to provide for the created contact. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of customer creates a contact resource for a spacecraft resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ContactInner> beginCreate(String resourceGroupName, String spacecraftName, - String contactName, ContactInner parameters, Context context); - - /** - * Creates a contact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @param parameters The parameters to provide for the created contact. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a contact resource for a spacecraft resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContactInner create(String resourceGroupName, String spacecraftName, String contactName, ContactInner parameters); - - /** - * Creates a contact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @param parameters The parameters to provide for the created contact. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a contact resource for a spacecraft resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContactInner create(String resourceGroupName, String spacecraftName, String contactName, ContactInner parameters, - Context context); - - /** - * Deletes a specified contact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String spacecraftName, String contactName); - - /** - * Deletes a specified contact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String spacecraftName, String contactName, - Context context); - - /** - * Deletes a specified contact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String spacecraftName, String contactName); - - /** - * Deletes a specified contact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String spacecraftName, String contactName, Context context); -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/OperationsClient.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/OperationsClient.java deleted file mode 100644 index 814b603185bc..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/OperationsClient.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.orbital.fluent.models.OperationInner; - -/** - * An instance of this class provides access to all the operations defined in OperationsClient. - */ -public interface OperationsClient { - /** - * Lists all of the available Orbital Rest API operations. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Lists all of the available Orbital Rest API operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/OperationsResultsClient.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/OperationsResultsClient.java deleted file mode 100644 index aaba33ac23a7..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/OperationsResultsClient.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.orbital.fluent.models.OperationResultInner; - -/** - * An instance of this class provides access to all the operations defined in OperationsResultsClient. - */ -public interface OperationsResultsClient { - /** - * Returns operation results. - * - * @param location The name of Azure region. - * @param operationId The ID of an ongoing async operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of operation Result Entity. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationResultInner> beginGet(String location, String operationId); - - /** - * Returns operation results. - * - * @param location The name of Azure region. - * @param operationId The ID of an ongoing async operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of operation Result Entity. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationResultInner> beginGet(String location, String operationId, - Context context); - - /** - * Returns operation results. - * - * @param location The name of Azure region. - * @param operationId The ID of an ongoing async operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation Result Entity. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OperationResultInner get(String location, String operationId); - - /** - * Returns operation results. - * - * @param location The name of Azure region. - * @param operationId The ID of an ongoing async operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation Result Entity. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OperationResultInner get(String location, String operationId, Context context); -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/SpacecraftsClient.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/SpacecraftsClient.java deleted file mode 100644 index e91b71fc8d8b..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/SpacecraftsClient.java +++ /dev/null @@ -1,311 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.orbital.fluent.models.AvailableContactsInner; -import com.azure.resourcemanager.orbital.fluent.models.SpacecraftInner; -import com.azure.resourcemanager.orbital.models.ContactParameters; -import com.azure.resourcemanager.orbital.models.TagsObject; - -/** - * An instance of this class provides access to all the operations defined in SpacecraftsClient. - */ -public interface SpacecraftsClient { - /** - * Returns list of spacecrafts by subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Returns list of spacecrafts by subscription. - * - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String skiptoken, Context context); - - /** - * Returns list of spacecrafts by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Returns list of spacecrafts by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, String skiptoken, Context context); - - /** - * Gets the specified spacecraft in a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified spacecraft in a specified resource group along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String spacecraftName, - Context context); - - /** - * Gets the specified spacecraft in a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified spacecraft in a specified resource group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SpacecraftInner getByResourceGroup(String resourceGroupName, String spacecraftName); - - /** - * Creates or updates a spacecraft resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters The parameters to provide for the created spacecraft. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of customer creates a spacecraft resource to schedule a contact. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SpacecraftInner> beginCreateOrUpdate(String resourceGroupName, - String spacecraftName, SpacecraftInner parameters); - - /** - * Creates or updates a spacecraft resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters The parameters to provide for the created spacecraft. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of customer creates a spacecraft resource to schedule a contact. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SpacecraftInner> beginCreateOrUpdate(String resourceGroupName, - String spacecraftName, SpacecraftInner parameters, Context context); - - /** - * Creates or updates a spacecraft resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters The parameters to provide for the created spacecraft. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a spacecraft resource to schedule a contact. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SpacecraftInner createOrUpdate(String resourceGroupName, String spacecraftName, SpacecraftInner parameters); - - /** - * Creates or updates a spacecraft resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters The parameters to provide for the created spacecraft. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a spacecraft resource to schedule a contact. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SpacecraftInner createOrUpdate(String resourceGroupName, String spacecraftName, SpacecraftInner parameters, - Context context); - - /** - * Deletes a specified spacecraft resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String spacecraftName); - - /** - * Deletes a specified spacecraft resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String spacecraftName, Context context); - - /** - * Deletes a specified spacecraft resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String spacecraftName); - - /** - * Deletes a specified spacecraft resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String spacecraftName, Context context); - - /** - * Updates the specified spacecraft tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters Parameters supplied to update spacecraft tags. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of customer creates a spacecraft resource to schedule a contact. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SpacecraftInner> beginUpdateTags(String resourceGroupName, - String spacecraftName, TagsObject parameters); - - /** - * Updates the specified spacecraft tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters Parameters supplied to update spacecraft tags. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of customer creates a spacecraft resource to schedule a contact. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SpacecraftInner> beginUpdateTags(String resourceGroupName, - String spacecraftName, TagsObject parameters, Context context); - - /** - * Updates the specified spacecraft tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters Parameters supplied to update spacecraft tags. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a spacecraft resource to schedule a contact. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SpacecraftInner updateTags(String resourceGroupName, String spacecraftName, TagsObject parameters); - - /** - * Updates the specified spacecraft tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters Parameters supplied to update spacecraft tags. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a spacecraft resource to schedule a contact. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SpacecraftInner updateTags(String resourceGroupName, String spacecraftName, TagsObject parameters, Context context); - - /** - * Returns list of available contacts. A contact is available if the spacecraft is visible from the ground station - * for more than the minimum viable contact duration provided in the contact profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters The parameters to provide for the contacts. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListAvailableContacts API service call as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listAvailableContacts(String resourceGroupName, String spacecraftName, - ContactParameters parameters); - - /** - * Returns list of available contacts. A contact is available if the spacecraft is visible from the ground station - * for more than the minimum viable contact duration provided in the contact profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters The parameters to provide for the contacts. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListAvailableContacts API service call as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listAvailableContacts(String resourceGroupName, String spacecraftName, - ContactParameters parameters, Context context); -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/AvailableContactsInner.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/AvailableContactsInner.java deleted file mode 100644 index af2adf4e5052..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/AvailableContactsInner.java +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.orbital.models.AvailableContactsSpacecraft; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * Customer retrieves list of Available Contacts for a spacecraft resource. Later, one of the available contact can be - * selected to create a contact. - */ -@Fluent -public final class AvailableContactsInner implements JsonSerializable { - /* - * The reference to the spacecraft resource. - */ - private AvailableContactsSpacecraft spacecraft; - - /* - * Name of Azure Ground Station. - */ - private String groundStationName; - - /* - * Properties of Contact resource. - */ - private AvailableContactsProperties innerProperties; - - /** - * Creates an instance of AvailableContactsInner class. - */ - public AvailableContactsInner() { - } - - /** - * Get the spacecraft property: The reference to the spacecraft resource. - * - * @return the spacecraft value. - */ - public AvailableContactsSpacecraft spacecraft() { - return this.spacecraft; - } - - /** - * Set the spacecraft property: The reference to the spacecraft resource. - * - * @param spacecraft the spacecraft value to set. - * @return the AvailableContactsInner object itself. - */ - public AvailableContactsInner withSpacecraft(AvailableContactsSpacecraft spacecraft) { - this.spacecraft = spacecraft; - return this; - } - - /** - * Get the groundStationName property: Name of Azure Ground Station. - * - * @return the groundStationName value. - */ - public String groundStationName() { - return this.groundStationName; - } - - /** - * Get the innerProperties property: Properties of Contact resource. - * - * @return the innerProperties value. - */ - private AvailableContactsProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the maximumElevationDegrees property: Maximum elevation of the antenna during the contact in decimal degrees. - * - * @return the maximumElevationDegrees value. - */ - public Float maximumElevationDegrees() { - return this.innerProperties() == null ? null : this.innerProperties().maximumElevationDegrees(); - } - - /** - * Get the txStartTime property: Time at which antenna transmit will be enabled (ISO 8601 UTC standard). - * - * @return the txStartTime value. - */ - public OffsetDateTime txStartTime() { - return this.innerProperties() == null ? null : this.innerProperties().txStartTime(); - } - - /** - * Get the txEndTime property: Time at which antenna transmit will be disabled (ISO 8601 UTC standard). - * - * @return the txEndTime value. - */ - public OffsetDateTime txEndTime() { - return this.innerProperties() == null ? null : this.innerProperties().txEndTime(); - } - - /** - * Get the rxStartTime property: Earliest time to receive a signal (ISO 8601 UTC standard). - * - * @return the rxStartTime value. - */ - public OffsetDateTime rxStartTime() { - return this.innerProperties() == null ? null : this.innerProperties().rxStartTime(); - } - - /** - * Get the rxEndTime property: Time to lost receiving a signal (ISO 8601 UTC standard). - * - * @return the rxEndTime value. - */ - public OffsetDateTime rxEndTime() { - return this.innerProperties() == null ? null : this.innerProperties().rxEndTime(); - } - - /** - * Get the startAzimuthDegrees property: Azimuth of the antenna at the start of the contact in decimal degrees. - * - * @return the startAzimuthDegrees value. - */ - public Float startAzimuthDegrees() { - return this.innerProperties() == null ? null : this.innerProperties().startAzimuthDegrees(); - } - - /** - * Get the endAzimuthDegrees property: Azimuth of the antenna at the end of the contact in decimal degrees. - * - * @return the endAzimuthDegrees value. - */ - public Float endAzimuthDegrees() { - return this.innerProperties() == null ? null : this.innerProperties().endAzimuthDegrees(); - } - - /** - * Get the startElevationDegrees property: Spacecraft elevation above the horizon at contact start. - * - * @return the startElevationDegrees value. - */ - public Float startElevationDegrees() { - return this.innerProperties() == null ? null : this.innerProperties().startElevationDegrees(); - } - - /** - * Get the endElevationDegrees property: Spacecraft elevation above the horizon at contact end. - * - * @return the endElevationDegrees value. - */ - public Float endElevationDegrees() { - return this.innerProperties() == null ? null : this.innerProperties().endElevationDegrees(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (spacecraft() != null) { - spacecraft().validate(); - } - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("spacecraft", this.spacecraft); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AvailableContactsInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AvailableContactsInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the AvailableContactsInner. - */ - public static AvailableContactsInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AvailableContactsInner deserializedAvailableContactsInner = new AvailableContactsInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("spacecraft".equals(fieldName)) { - deserializedAvailableContactsInner.spacecraft = AvailableContactsSpacecraft.fromJson(reader); - } else if ("groundStationName".equals(fieldName)) { - deserializedAvailableContactsInner.groundStationName = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedAvailableContactsInner.innerProperties = AvailableContactsProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedAvailableContactsInner; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/AvailableContactsProperties.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/AvailableContactsProperties.java deleted file mode 100644 index 66ee0d14f218..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/AvailableContactsProperties.java +++ /dev/null @@ -1,230 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.orbital.models.ContactInstanceProperties; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * Properties of Contact resource. - */ -@Immutable -public final class AvailableContactsProperties extends ContactInstanceProperties { - /* - * Spacecraft elevation above the horizon at contact end. - */ - private Float endElevationDegrees; - - /* - * Spacecraft elevation above the horizon at contact start. - */ - private Float startElevationDegrees; - - /* - * Azimuth of the antenna at the end of the contact in decimal degrees. - */ - private Float endAzimuthDegrees; - - /* - * Azimuth of the antenna at the start of the contact in decimal degrees. - */ - private Float startAzimuthDegrees; - - /* - * Time to lost receiving a signal (ISO 8601 UTC standard). - */ - private OffsetDateTime rxEndTime; - - /* - * Earliest time to receive a signal (ISO 8601 UTC standard). - */ - private OffsetDateTime rxStartTime; - - /* - * Time at which antenna transmit will be disabled (ISO 8601 UTC standard). - */ - private OffsetDateTime txEndTime; - - /* - * Time at which antenna transmit will be enabled (ISO 8601 UTC standard). - */ - private OffsetDateTime txStartTime; - - /* - * Maximum elevation of the antenna during the contact in decimal degrees. - */ - private Float maximumElevationDegrees; - - /** - * Creates an instance of AvailableContactsProperties class. - */ - public AvailableContactsProperties() { - } - - /** - * Get the endElevationDegrees property: Spacecraft elevation above the horizon at contact end. - * - * @return the endElevationDegrees value. - */ - @Override - public Float endElevationDegrees() { - return this.endElevationDegrees; - } - - /** - * Get the startElevationDegrees property: Spacecraft elevation above the horizon at contact start. - * - * @return the startElevationDegrees value. - */ - @Override - public Float startElevationDegrees() { - return this.startElevationDegrees; - } - - /** - * Get the endAzimuthDegrees property: Azimuth of the antenna at the end of the contact in decimal degrees. - * - * @return the endAzimuthDegrees value. - */ - @Override - public Float endAzimuthDegrees() { - return this.endAzimuthDegrees; - } - - /** - * Get the startAzimuthDegrees property: Azimuth of the antenna at the start of the contact in decimal degrees. - * - * @return the startAzimuthDegrees value. - */ - @Override - public Float startAzimuthDegrees() { - return this.startAzimuthDegrees; - } - - /** - * Get the rxEndTime property: Time to lost receiving a signal (ISO 8601 UTC standard). - * - * @return the rxEndTime value. - */ - @Override - public OffsetDateTime rxEndTime() { - return this.rxEndTime; - } - - /** - * Get the rxStartTime property: Earliest time to receive a signal (ISO 8601 UTC standard). - * - * @return the rxStartTime value. - */ - @Override - public OffsetDateTime rxStartTime() { - return this.rxStartTime; - } - - /** - * Get the txEndTime property: Time at which antenna transmit will be disabled (ISO 8601 UTC standard). - * - * @return the txEndTime value. - */ - @Override - public OffsetDateTime txEndTime() { - return this.txEndTime; - } - - /** - * Get the txStartTime property: Time at which antenna transmit will be enabled (ISO 8601 UTC standard). - * - * @return the txStartTime value. - */ - @Override - public OffsetDateTime txStartTime() { - return this.txStartTime; - } - - /** - * Get the maximumElevationDegrees property: Maximum elevation of the antenna during the contact in decimal degrees. - * - * @return the maximumElevationDegrees value. - */ - @Override - public Float maximumElevationDegrees() { - return this.maximumElevationDegrees; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AvailableContactsProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AvailableContactsProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AvailableContactsProperties. - */ - public static AvailableContactsProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AvailableContactsProperties deserializedAvailableContactsProperties = new AvailableContactsProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("maximumElevationDegrees".equals(fieldName)) { - deserializedAvailableContactsProperties.maximumElevationDegrees - = reader.getNullable(JsonReader::getFloat); - } else if ("txStartTime".equals(fieldName)) { - deserializedAvailableContactsProperties.txStartTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("txEndTime".equals(fieldName)) { - deserializedAvailableContactsProperties.txEndTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("rxStartTime".equals(fieldName)) { - deserializedAvailableContactsProperties.rxStartTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("rxEndTime".equals(fieldName)) { - deserializedAvailableContactsProperties.rxEndTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("startAzimuthDegrees".equals(fieldName)) { - deserializedAvailableContactsProperties.startAzimuthDegrees - = reader.getNullable(JsonReader::getFloat); - } else if ("endAzimuthDegrees".equals(fieldName)) { - deserializedAvailableContactsProperties.endAzimuthDegrees - = reader.getNullable(JsonReader::getFloat); - } else if ("startElevationDegrees".equals(fieldName)) { - deserializedAvailableContactsProperties.startElevationDegrees - = reader.getNullable(JsonReader::getFloat); - } else if ("endElevationDegrees".equals(fieldName)) { - deserializedAvailableContactsProperties.endElevationDegrees - = reader.getNullable(JsonReader::getFloat); - } else { - reader.skipChildren(); - } - } - - return deserializedAvailableContactsProperties; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/AvailableGroundStationInner.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/AvailableGroundStationInner.java deleted file mode 100644 index cb0f9f666684..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/AvailableGroundStationInner.java +++ /dev/null @@ -1,309 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.orbital.models.ReleaseMode; -import java.io.IOException; - -/** - * Ground Stations available to schedule Contacts. - */ -@Fluent -public final class AvailableGroundStationInner implements JsonSerializable { - /* - * ID of groundStation. - */ - private String id; - - /* - * Name of the ground station. - */ - private String name; - - /* - * Azure region. - */ - private String location; - - /* - * Resource type. - */ - private String type; - - /* - * The properties bag for this resource. - */ - private AvailableGroundStationProperties innerProperties = new AvailableGroundStationProperties(); - - /** - * Creates an instance of AvailableGroundStationInner class. - */ - public AvailableGroundStationInner() { - } - - /** - * Get the id property: ID of groundStation. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the name property: Name of the ground station. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the location property: Azure region. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Azure region. - * - * @param location the location value to set. - * @return the AvailableGroundStationInner object itself. - */ - public AvailableGroundStationInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the type property: Resource type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Get the innerProperties property: The properties bag for this resource. - * - * @return the innerProperties value. - */ - private AvailableGroundStationProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the city property: City of ground station. - * - * @return the city value. - */ - public String city() { - return this.innerProperties() == null ? null : this.innerProperties().city(); - } - - /** - * Set the city property: City of ground station. - * - * @param city the city value to set. - * @return the AvailableGroundStationInner object itself. - */ - public AvailableGroundStationInner withCity(String city) { - if (this.innerProperties() == null) { - this.innerProperties = new AvailableGroundStationProperties(); - } - this.innerProperties().withCity(city); - return this; - } - - /** - * Get the providerName property: Ground station provider name. - * - * @return the providerName value. - */ - public String providerName() { - return this.innerProperties() == null ? null : this.innerProperties().providerName(); - } - - /** - * Set the providerName property: Ground station provider name. - * - * @param providerName the providerName value to set. - * @return the AvailableGroundStationInner object itself. - */ - public AvailableGroundStationInner withProviderName(String providerName) { - if (this.innerProperties() == null) { - this.innerProperties = new AvailableGroundStationProperties(); - } - this.innerProperties().withProviderName(providerName); - return this; - } - - /** - * Get the longitudeDegrees property: Longitude of the ground station in decimal degrees. - * - * @return the longitudeDegrees value. - */ - public Float longitudeDegrees() { - return this.innerProperties() == null ? null : this.innerProperties().longitudeDegrees(); - } - - /** - * Set the longitudeDegrees property: Longitude of the ground station in decimal degrees. - * - * @param longitudeDegrees the longitudeDegrees value to set. - * @return the AvailableGroundStationInner object itself. - */ - public AvailableGroundStationInner withLongitudeDegrees(Float longitudeDegrees) { - if (this.innerProperties() == null) { - this.innerProperties = new AvailableGroundStationProperties(); - } - this.innerProperties().withLongitudeDegrees(longitudeDegrees); - return this; - } - - /** - * Get the latitudeDegrees property: Latitude of the ground station in decimal degrees. - * - * @return the latitudeDegrees value. - */ - public Float latitudeDegrees() { - return this.innerProperties() == null ? null : this.innerProperties().latitudeDegrees(); - } - - /** - * Set the latitudeDegrees property: Latitude of the ground station in decimal degrees. - * - * @param latitudeDegrees the latitudeDegrees value to set. - * @return the AvailableGroundStationInner object itself. - */ - public AvailableGroundStationInner withLatitudeDegrees(Float latitudeDegrees) { - if (this.innerProperties() == null) { - this.innerProperties = new AvailableGroundStationProperties(); - } - this.innerProperties().withLatitudeDegrees(latitudeDegrees); - return this; - } - - /** - * Get the altitudeMeters property: Altitude of the ground station. - * - * @return the altitudeMeters value. - */ - public Float altitudeMeters() { - return this.innerProperties() == null ? null : this.innerProperties().altitudeMeters(); - } - - /** - * Set the altitudeMeters property: Altitude of the ground station. - * - * @param altitudeMeters the altitudeMeters value to set. - * @return the AvailableGroundStationInner object itself. - */ - public AvailableGroundStationInner withAltitudeMeters(Float altitudeMeters) { - if (this.innerProperties() == null) { - this.innerProperties = new AvailableGroundStationProperties(); - } - this.innerProperties().withAltitudeMeters(altitudeMeters); - return this; - } - - /** - * Get the releaseMode property: Release Status of a ground station. - * - * @return the releaseMode value. - */ - public ReleaseMode releaseMode() { - return this.innerProperties() == null ? null : this.innerProperties().releaseMode(); - } - - /** - * Set the releaseMode property: Release Status of a ground station. - * - * @param releaseMode the releaseMode value to set. - * @return the AvailableGroundStationInner object itself. - */ - public AvailableGroundStationInner withReleaseMode(ReleaseMode releaseMode) { - if (this.innerProperties() == null) { - this.innerProperties = new AvailableGroundStationProperties(); - } - this.innerProperties().withReleaseMode(releaseMode); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model AvailableGroundStationInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AvailableGroundStationInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - jsonWriter.writeStringField("location", this.location); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AvailableGroundStationInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AvailableGroundStationInner if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the AvailableGroundStationInner. - */ - public static AvailableGroundStationInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AvailableGroundStationInner deserializedAvailableGroundStationInner = new AvailableGroundStationInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedAvailableGroundStationInner.innerProperties - = AvailableGroundStationProperties.fromJson(reader); - } else if ("id".equals(fieldName)) { - deserializedAvailableGroundStationInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedAvailableGroundStationInner.name = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedAvailableGroundStationInner.location = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedAvailableGroundStationInner.type = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAvailableGroundStationInner; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/AvailableGroundStationProperties.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/AvailableGroundStationProperties.java deleted file mode 100644 index 01241a317d10..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/AvailableGroundStationProperties.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.orbital.models.AvailableGroundStationPropertiesAutoGenerated; -import com.azure.resourcemanager.orbital.models.ReleaseMode; -import java.io.IOException; - -/** - * The properties bag for this resource. - */ -@Fluent -public final class AvailableGroundStationProperties extends AvailableGroundStationPropertiesAutoGenerated { - /** - * Creates an instance of AvailableGroundStationProperties class. - */ - public AvailableGroundStationProperties() { - } - - /** - * {@inheritDoc} - */ - @Override - public AvailableGroundStationProperties withCity(String city) { - super.withCity(city); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AvailableGroundStationProperties withProviderName(String providerName) { - super.withProviderName(providerName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AvailableGroundStationProperties withLongitudeDegrees(Float longitudeDegrees) { - super.withLongitudeDegrees(longitudeDegrees); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AvailableGroundStationProperties withLatitudeDegrees(Float latitudeDegrees) { - super.withLatitudeDegrees(latitudeDegrees); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AvailableGroundStationProperties withAltitudeMeters(Float altitudeMeters) { - super.withAltitudeMeters(altitudeMeters); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AvailableGroundStationProperties withReleaseMode(ReleaseMode releaseMode) { - super.withReleaseMode(releaseMode); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("city", city()); - jsonWriter.writeStringField("providerName", providerName()); - jsonWriter.writeNumberField("longitudeDegrees", longitudeDegrees()); - jsonWriter.writeNumberField("latitudeDegrees", latitudeDegrees()); - jsonWriter.writeNumberField("altitudeMeters", altitudeMeters()); - jsonWriter.writeStringField("releaseMode", releaseMode() == null ? null : releaseMode().toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AvailableGroundStationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AvailableGroundStationProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AvailableGroundStationProperties. - */ - public static AvailableGroundStationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AvailableGroundStationProperties deserializedAvailableGroundStationProperties - = new AvailableGroundStationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("city".equals(fieldName)) { - deserializedAvailableGroundStationProperties.withCity(reader.getString()); - } else if ("providerName".equals(fieldName)) { - deserializedAvailableGroundStationProperties.withProviderName(reader.getString()); - } else if ("longitudeDegrees".equals(fieldName)) { - deserializedAvailableGroundStationProperties - .withLongitudeDegrees(reader.getNullable(JsonReader::getFloat)); - } else if ("latitudeDegrees".equals(fieldName)) { - deserializedAvailableGroundStationProperties - .withLatitudeDegrees(reader.getNullable(JsonReader::getFloat)); - } else if ("altitudeMeters".equals(fieldName)) { - deserializedAvailableGroundStationProperties - .withAltitudeMeters(reader.getNullable(JsonReader::getFloat)); - } else if ("releaseMode".equals(fieldName)) { - deserializedAvailableGroundStationProperties - .withReleaseMode(ReleaseMode.fromString(reader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedAvailableGroundStationProperties; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/ContactInner.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/ContactInner.java deleted file mode 100644 index 2d48bcd069a1..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/ContactInner.java +++ /dev/null @@ -1,388 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesAntennaConfiguration; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesContactProfile; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesProvisioningState; -import com.azure.resourcemanager.orbital.models.ContactsStatus; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * Customer creates a contact resource for a spacecraft resource. - */ -@Fluent -public final class ContactInner extends ProxyResource { - /* - * Properties of the Contact Resource. - */ - private ContactsProperties innerProperties = new ContactsProperties(); - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of ContactInner class. - */ - public ContactInner() { - } - - /** - * Get the innerProperties property: Properties of the Contact Resource. - * - * @return the innerProperties value. - */ - private ContactsProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the provisioningState property: The current state of the resource's creation, deletion, or modification. - * - * @return the provisioningState value. - */ - public ContactsPropertiesProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Set the provisioningState property: The current state of the resource's creation, deletion, or modification. - * - * @param provisioningState the provisioningState value to set. - * @return the ContactInner object itself. - */ - public ContactInner withProvisioningState(ContactsPropertiesProvisioningState provisioningState) { - if (this.innerProperties() == null) { - this.innerProperties = new ContactsProperties(); - } - this.innerProperties().withProvisioningState(provisioningState); - return this; - } - - /** - * Get the status property: Status of a contact. - * - * @return the status value. - */ - public ContactsStatus status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); - } - - /** - * Get the reservationStartTime property: Reservation start time of a contact (ISO 8601 UTC standard). - * - * @return the reservationStartTime value. - */ - public OffsetDateTime reservationStartTime() { - return this.innerProperties() == null ? null : this.innerProperties().reservationStartTime(); - } - - /** - * Set the reservationStartTime property: Reservation start time of a contact (ISO 8601 UTC standard). - * - * @param reservationStartTime the reservationStartTime value to set. - * @return the ContactInner object itself. - */ - public ContactInner withReservationStartTime(OffsetDateTime reservationStartTime) { - if (this.innerProperties() == null) { - this.innerProperties = new ContactsProperties(); - } - this.innerProperties().withReservationStartTime(reservationStartTime); - return this; - } - - /** - * Get the reservationEndTime property: Reservation end time of a contact (ISO 8601 UTC standard). - * - * @return the reservationEndTime value. - */ - public OffsetDateTime reservationEndTime() { - return this.innerProperties() == null ? null : this.innerProperties().reservationEndTime(); - } - - /** - * Set the reservationEndTime property: Reservation end time of a contact (ISO 8601 UTC standard). - * - * @param reservationEndTime the reservationEndTime value to set. - * @return the ContactInner object itself. - */ - public ContactInner withReservationEndTime(OffsetDateTime reservationEndTime) { - if (this.innerProperties() == null) { - this.innerProperties = new ContactsProperties(); - } - this.innerProperties().withReservationEndTime(reservationEndTime); - return this; - } - - /** - * Get the rxStartTime property: Receive start time of a contact (ISO 8601 UTC standard). - * - * @return the rxStartTime value. - */ - public OffsetDateTime rxStartTime() { - return this.innerProperties() == null ? null : this.innerProperties().rxStartTime(); - } - - /** - * Get the rxEndTime property: Receive end time of a contact (ISO 8601 UTC standard). - * - * @return the rxEndTime value. - */ - public OffsetDateTime rxEndTime() { - return this.innerProperties() == null ? null : this.innerProperties().rxEndTime(); - } - - /** - * Get the txStartTime property: Transmit start time of a contact (ISO 8601 UTC standard). - * - * @return the txStartTime value. - */ - public OffsetDateTime txStartTime() { - return this.innerProperties() == null ? null : this.innerProperties().txStartTime(); - } - - /** - * Get the txEndTime property: Transmit end time of a contact (ISO 8601 UTC standard). - * - * @return the txEndTime value. - */ - public OffsetDateTime txEndTime() { - return this.innerProperties() == null ? null : this.innerProperties().txEndTime(); - } - - /** - * Get the errorMessage property: Any error message while scheduling a contact. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.innerProperties() == null ? null : this.innerProperties().errorMessage(); - } - - /** - * Get the maximumElevationDegrees property: Maximum elevation of the antenna during the contact in decimal degrees. - * - * @return the maximumElevationDegrees value. - */ - public Float maximumElevationDegrees() { - return this.innerProperties() == null ? null : this.innerProperties().maximumElevationDegrees(); - } - - /** - * Get the startAzimuthDegrees property: Azimuth of the antenna at the start of the contact in decimal degrees. - * - * @return the startAzimuthDegrees value. - */ - public Float startAzimuthDegrees() { - return this.innerProperties() == null ? null : this.innerProperties().startAzimuthDegrees(); - } - - /** - * Get the endAzimuthDegrees property: Azimuth of the antenna at the end of the contact in decimal degrees. - * - * @return the endAzimuthDegrees value. - */ - public Float endAzimuthDegrees() { - return this.innerProperties() == null ? null : this.innerProperties().endAzimuthDegrees(); - } - - /** - * Get the groundStationName property: Azure Ground Station name. - * - * @return the groundStationName value. - */ - public String groundStationName() { - return this.innerProperties() == null ? null : this.innerProperties().groundStationName(); - } - - /** - * Set the groundStationName property: Azure Ground Station name. - * - * @param groundStationName the groundStationName value to set. - * @return the ContactInner object itself. - */ - public ContactInner withGroundStationName(String groundStationName) { - if (this.innerProperties() == null) { - this.innerProperties = new ContactsProperties(); - } - this.innerProperties().withGroundStationName(groundStationName); - return this; - } - - /** - * Get the startElevationDegrees property: Spacecraft elevation above the horizon at contact start. - * - * @return the startElevationDegrees value. - */ - public Float startElevationDegrees() { - return this.innerProperties() == null ? null : this.innerProperties().startElevationDegrees(); - } - - /** - * Get the endElevationDegrees property: Spacecraft elevation above the horizon at contact end. - * - * @return the endElevationDegrees value. - */ - public Float endElevationDegrees() { - return this.innerProperties() == null ? null : this.innerProperties().endElevationDegrees(); - } - - /** - * Get the antennaConfiguration property: The configuration associated with the allocated antenna. - * - * @return the antennaConfiguration value. - */ - public ContactsPropertiesAntennaConfiguration antennaConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().antennaConfiguration(); - } - - /** - * Get the contactProfile property: The reference to the contact profile resource. - * - * @return the contactProfile value. - */ - public ContactsPropertiesContactProfile contactProfile() { - return this.innerProperties() == null ? null : this.innerProperties().contactProfile(); - } - - /** - * Set the contactProfile property: The reference to the contact profile resource. - * - * @param contactProfile the contactProfile value to set. - * @return the ContactInner object itself. - */ - public ContactInner withContactProfile(ContactsPropertiesContactProfile contactProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ContactsProperties(); - } - this.innerProperties().withContactProfile(contactProfile); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property innerProperties in model ContactInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContactInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContactInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContactInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ContactInner. - */ - public static ContactInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContactInner deserializedContactInner = new ContactInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedContactInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedContactInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedContactInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedContactInner.innerProperties = ContactsProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedContactInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedContactInner; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/ContactProfileInner.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/ContactProfileInner.java deleted file mode 100644 index 42bc57320f67..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/ContactProfileInner.java +++ /dev/null @@ -1,388 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.orbital.models.AutoTrackingConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfileLink; -import com.azure.resourcemanager.orbital.models.ContactProfileThirdPartyConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesNetworkConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesProvisioningState; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * Customer creates a Contact Profile Resource, which will contain all of the configurations required for scheduling a - * contact. - */ -@Fluent -public final class ContactProfileInner extends Resource { - /* - * Properties of the contact profile resource. - */ - private ContactProfileProperties innerProperties = new ContactProfileProperties(); - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of ContactProfileInner class. - */ - public ContactProfileInner() { - } - - /** - * Get the innerProperties property: Properties of the contact profile resource. - * - * @return the innerProperties value. - */ - private ContactProfileProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public ContactProfileInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ContactProfileInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the provisioningState property: The current state of the resource's creation, deletion, or modification. - * - * @return the provisioningState value. - */ - public ContactProfilesPropertiesProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Set the provisioningState property: The current state of the resource's creation, deletion, or modification. - * - * @param provisioningState the provisioningState value to set. - * @return the ContactProfileInner object itself. - */ - public ContactProfileInner withProvisioningState(ContactProfilesPropertiesProvisioningState provisioningState) { - if (this.innerProperties() == null) { - this.innerProperties = new ContactProfileProperties(); - } - this.innerProperties().withProvisioningState(provisioningState); - return this; - } - - /** - * Get the minimumViableContactDuration property: Minimum viable contact duration in ISO 8601 format. Used for - * listing the available contacts with a spacecraft at a given ground station. - * - * @return the minimumViableContactDuration value. - */ - public String minimumViableContactDuration() { - return this.innerProperties() == null ? null : this.innerProperties().minimumViableContactDuration(); - } - - /** - * Set the minimumViableContactDuration property: Minimum viable contact duration in ISO 8601 format. Used for - * listing the available contacts with a spacecraft at a given ground station. - * - * @param minimumViableContactDuration the minimumViableContactDuration value to set. - * @return the ContactProfileInner object itself. - */ - public ContactProfileInner withMinimumViableContactDuration(String minimumViableContactDuration) { - if (this.innerProperties() == null) { - this.innerProperties = new ContactProfileProperties(); - } - this.innerProperties().withMinimumViableContactDuration(minimumViableContactDuration); - return this; - } - - /** - * Get the minimumElevationDegrees property: Minimum viable elevation for the contact in decimal degrees. Used for - * listing the available contacts with a spacecraft at a given ground station. - * - * @return the minimumElevationDegrees value. - */ - public Float minimumElevationDegrees() { - return this.innerProperties() == null ? null : this.innerProperties().minimumElevationDegrees(); - } - - /** - * Set the minimumElevationDegrees property: Minimum viable elevation for the contact in decimal degrees. Used for - * listing the available contacts with a spacecraft at a given ground station. - * - * @param minimumElevationDegrees the minimumElevationDegrees value to set. - * @return the ContactProfileInner object itself. - */ - public ContactProfileInner withMinimumElevationDegrees(Float minimumElevationDegrees) { - if (this.innerProperties() == null) { - this.innerProperties = new ContactProfileProperties(); - } - this.innerProperties().withMinimumElevationDegrees(minimumElevationDegrees); - return this; - } - - /** - * Get the autoTrackingConfiguration property: Auto-tracking configuration. - * - * @return the autoTrackingConfiguration value. - */ - public AutoTrackingConfiguration autoTrackingConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().autoTrackingConfiguration(); - } - - /** - * Set the autoTrackingConfiguration property: Auto-tracking configuration. - * - * @param autoTrackingConfiguration the autoTrackingConfiguration value to set. - * @return the ContactProfileInner object itself. - */ - public ContactProfileInner withAutoTrackingConfiguration(AutoTrackingConfiguration autoTrackingConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new ContactProfileProperties(); - } - this.innerProperties().withAutoTrackingConfiguration(autoTrackingConfiguration); - return this; - } - - /** - * Get the eventHubUri property: ARM resource identifier of the Event Hub used for telemetry. Requires granting - * Orbital Resource Provider the rights to send telemetry into the hub. - * - * @return the eventHubUri value. - */ - public String eventHubUri() { - return this.innerProperties() == null ? null : this.innerProperties().eventHubUri(); - } - - /** - * Set the eventHubUri property: ARM resource identifier of the Event Hub used for telemetry. Requires granting - * Orbital Resource Provider the rights to send telemetry into the hub. - * - * @param eventHubUri the eventHubUri value to set. - * @return the ContactProfileInner object itself. - */ - public ContactProfileInner withEventHubUri(String eventHubUri) { - if (this.innerProperties() == null) { - this.innerProperties = new ContactProfileProperties(); - } - this.innerProperties().withEventHubUri(eventHubUri); - return this; - } - - /** - * Get the networkConfiguration property: Network configuration of customer virtual network. - * - * @return the networkConfiguration value. - */ - public ContactProfilesPropertiesNetworkConfiguration networkConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().networkConfiguration(); - } - - /** - * Set the networkConfiguration property: Network configuration of customer virtual network. - * - * @param networkConfiguration the networkConfiguration value to set. - * @return the ContactProfileInner object itself. - */ - public ContactProfileInner - withNetworkConfiguration(ContactProfilesPropertiesNetworkConfiguration networkConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new ContactProfileProperties(); - } - this.innerProperties().withNetworkConfiguration(networkConfiguration); - return this; - } - - /** - * Get the thirdPartyConfigurations property: Third-party mission configuration of the Contact Profile. Describes RF - * links, modem processing, and IP endpoints. - * - * @return the thirdPartyConfigurations value. - */ - public List thirdPartyConfigurations() { - return this.innerProperties() == null ? null : this.innerProperties().thirdPartyConfigurations(); - } - - /** - * Set the thirdPartyConfigurations property: Third-party mission configuration of the Contact Profile. Describes RF - * links, modem processing, and IP endpoints. - * - * @param thirdPartyConfigurations the thirdPartyConfigurations value to set. - * @return the ContactProfileInner object itself. - */ - public ContactProfileInner - withThirdPartyConfigurations(List thirdPartyConfigurations) { - if (this.innerProperties() == null) { - this.innerProperties = new ContactProfileProperties(); - } - this.innerProperties().withThirdPartyConfigurations(thirdPartyConfigurations); - return this; - } - - /** - * Get the links property: Links of the Contact Profile. Describes RF links, modem processing, and IP endpoints. - * - * @return the links value. - */ - public List links() { - return this.innerProperties() == null ? null : this.innerProperties().links(); - } - - /** - * Set the links property: Links of the Contact Profile. Describes RF links, modem processing, and IP endpoints. - * - * @param links the links value to set. - * @return the ContactProfileInner object itself. - */ - public ContactProfileInner withLinks(List links) { - if (this.innerProperties() == null) { - this.innerProperties = new ContactProfileProperties(); - } - this.innerProperties().withLinks(links); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model ContactProfileInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContactProfileInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContactProfileInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContactProfileInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ContactProfileInner. - */ - public static ContactProfileInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContactProfileInner deserializedContactProfileInner = new ContactProfileInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedContactProfileInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedContactProfileInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedContactProfileInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedContactProfileInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedContactProfileInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedContactProfileInner.innerProperties = ContactProfileProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedContactProfileInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedContactProfileInner; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/ContactProfileProperties.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/ContactProfileProperties.java deleted file mode 100644 index d5b40bd06751..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/ContactProfileProperties.java +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.orbital.models.AutoTrackingConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfileLink; -import com.azure.resourcemanager.orbital.models.ContactProfileThirdPartyConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfilesProperties; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesNetworkConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesProvisioningState; -import java.io.IOException; -import java.util.List; - -/** - * Properties of the contact profile resource. - */ -@Fluent -public final class ContactProfileProperties extends ContactProfilesProperties { - /** - * Creates an instance of ContactProfileProperties class. - */ - public ContactProfileProperties() { - } - - /** - * {@inheritDoc} - */ - @Override - public ContactProfileProperties - withProvisioningState(ContactProfilesPropertiesProvisioningState provisioningState) { - super.withProvisioningState(provisioningState); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ContactProfileProperties withMinimumViableContactDuration(String minimumViableContactDuration) { - super.withMinimumViableContactDuration(minimumViableContactDuration); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ContactProfileProperties withMinimumElevationDegrees(Float minimumElevationDegrees) { - super.withMinimumElevationDegrees(minimumElevationDegrees); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ContactProfileProperties withAutoTrackingConfiguration(AutoTrackingConfiguration autoTrackingConfiguration) { - super.withAutoTrackingConfiguration(autoTrackingConfiguration); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ContactProfileProperties withEventHubUri(String eventHubUri) { - super.withEventHubUri(eventHubUri); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ContactProfileProperties - withNetworkConfiguration(ContactProfilesPropertiesNetworkConfiguration networkConfiguration) { - super.withNetworkConfiguration(networkConfiguration); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ContactProfileProperties - withThirdPartyConfigurations(List thirdPartyConfigurations) { - super.withThirdPartyConfigurations(thirdPartyConfigurations); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ContactProfileProperties withLinks(List links) { - super.withLinks(links); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (networkConfiguration() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property networkConfiguration in model ContactProfileProperties")); - } else { - networkConfiguration().validate(); - } - if (thirdPartyConfigurations() != null) { - thirdPartyConfigurations().forEach(e -> e.validate()); - } - if (links() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property links in model ContactProfileProperties")); - } else { - links().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContactProfileProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("networkConfiguration", networkConfiguration()); - jsonWriter.writeArrayField("links", links(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("provisioningState", - provisioningState() == null ? null : provisioningState().toString()); - jsonWriter.writeStringField("minimumViableContactDuration", minimumViableContactDuration()); - jsonWriter.writeNumberField("minimumElevationDegrees", minimumElevationDegrees()); - jsonWriter.writeStringField("autoTrackingConfiguration", - autoTrackingConfiguration() == null ? null : autoTrackingConfiguration().toString()); - jsonWriter.writeStringField("eventHubUri", eventHubUri()); - jsonWriter.writeArrayField("thirdPartyConfigurations", thirdPartyConfigurations(), - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContactProfileProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContactProfileProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ContactProfileProperties. - */ - public static ContactProfileProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContactProfileProperties deserializedContactProfileProperties = new ContactProfileProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("networkConfiguration".equals(fieldName)) { - deserializedContactProfileProperties - .withNetworkConfiguration(ContactProfilesPropertiesNetworkConfiguration.fromJson(reader)); - } else if ("links".equals(fieldName)) { - List links = reader.readArray(reader1 -> ContactProfileLink.fromJson(reader1)); - deserializedContactProfileProperties.withLinks(links); - } else if ("provisioningState".equals(fieldName)) { - deserializedContactProfileProperties.withProvisioningState( - ContactProfilesPropertiesProvisioningState.fromString(reader.getString())); - } else if ("minimumViableContactDuration".equals(fieldName)) { - deserializedContactProfileProperties.withMinimumViableContactDuration(reader.getString()); - } else if ("minimumElevationDegrees".equals(fieldName)) { - deserializedContactProfileProperties - .withMinimumElevationDegrees(reader.getNullable(JsonReader::getFloat)); - } else if ("autoTrackingConfiguration".equals(fieldName)) { - deserializedContactProfileProperties - .withAutoTrackingConfiguration(AutoTrackingConfiguration.fromString(reader.getString())); - } else if ("eventHubUri".equals(fieldName)) { - deserializedContactProfileProperties.withEventHubUri(reader.getString()); - } else if ("thirdPartyConfigurations".equals(fieldName)) { - List thirdPartyConfigurations - = reader.readArray(reader1 -> ContactProfileThirdPartyConfiguration.fromJson(reader1)); - deserializedContactProfileProperties.withThirdPartyConfigurations(thirdPartyConfigurations); - } else { - reader.skipChildren(); - } - } - - return deserializedContactProfileProperties; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/ContactsProperties.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/ContactsProperties.java deleted file mode 100644 index b0ac26563573..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/ContactsProperties.java +++ /dev/null @@ -1,448 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesAntennaConfiguration; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesContactProfile; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesProvisioningState; -import com.azure.resourcemanager.orbital.models.ContactsStatus; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; - -/** - * Properties of the Contact Resource. - */ -@Fluent -public final class ContactsProperties implements JsonSerializable { - /* - * The current state of the resource's creation, deletion, or modification. - */ - private ContactsPropertiesProvisioningState provisioningState; - - /* - * Status of a contact. - */ - private ContactsStatus status; - - /* - * Reservation start time of a contact (ISO 8601 UTC standard). - */ - private OffsetDateTime reservationStartTime; - - /* - * Reservation end time of a contact (ISO 8601 UTC standard). - */ - private OffsetDateTime reservationEndTime; - - /* - * Receive start time of a contact (ISO 8601 UTC standard). - */ - private OffsetDateTime rxStartTime; - - /* - * Receive end time of a contact (ISO 8601 UTC standard). - */ - private OffsetDateTime rxEndTime; - - /* - * Transmit start time of a contact (ISO 8601 UTC standard). - */ - private OffsetDateTime txStartTime; - - /* - * Transmit end time of a contact (ISO 8601 UTC standard). - */ - private OffsetDateTime txEndTime; - - /* - * Any error message while scheduling a contact. - */ - private String errorMessage; - - /* - * Maximum elevation of the antenna during the contact in decimal degrees. - */ - private Float maximumElevationDegrees; - - /* - * Azimuth of the antenna at the start of the contact in decimal degrees. - */ - private Float startAzimuthDegrees; - - /* - * Azimuth of the antenna at the end of the contact in decimal degrees. - */ - private Float endAzimuthDegrees; - - /* - * Azure Ground Station name. - */ - private String groundStationName; - - /* - * Spacecraft elevation above the horizon at contact start. - */ - private Float startElevationDegrees; - - /* - * Spacecraft elevation above the horizon at contact end. - */ - private Float endElevationDegrees; - - /* - * The configuration associated with the allocated antenna. - */ - private ContactsPropertiesAntennaConfiguration antennaConfiguration; - - /* - * The reference to the contact profile resource. - */ - private ContactsPropertiesContactProfile contactProfile; - - /** - * Creates an instance of ContactsProperties class. - */ - public ContactsProperties() { - } - - /** - * Get the provisioningState property: The current state of the resource's creation, deletion, or modification. - * - * @return the provisioningState value. - */ - public ContactsPropertiesProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState property: The current state of the resource's creation, deletion, or modification. - * - * @param provisioningState the provisioningState value to set. - * @return the ContactsProperties object itself. - */ - public ContactsProperties withProvisioningState(ContactsPropertiesProvisioningState provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the status property: Status of a contact. - * - * @return the status value. - */ - public ContactsStatus status() { - return this.status; - } - - /** - * Get the reservationStartTime property: Reservation start time of a contact (ISO 8601 UTC standard). - * - * @return the reservationStartTime value. - */ - public OffsetDateTime reservationStartTime() { - return this.reservationStartTime; - } - - /** - * Set the reservationStartTime property: Reservation start time of a contact (ISO 8601 UTC standard). - * - * @param reservationStartTime the reservationStartTime value to set. - * @return the ContactsProperties object itself. - */ - public ContactsProperties withReservationStartTime(OffsetDateTime reservationStartTime) { - this.reservationStartTime = reservationStartTime; - return this; - } - - /** - * Get the reservationEndTime property: Reservation end time of a contact (ISO 8601 UTC standard). - * - * @return the reservationEndTime value. - */ - public OffsetDateTime reservationEndTime() { - return this.reservationEndTime; - } - - /** - * Set the reservationEndTime property: Reservation end time of a contact (ISO 8601 UTC standard). - * - * @param reservationEndTime the reservationEndTime value to set. - * @return the ContactsProperties object itself. - */ - public ContactsProperties withReservationEndTime(OffsetDateTime reservationEndTime) { - this.reservationEndTime = reservationEndTime; - return this; - } - - /** - * Get the rxStartTime property: Receive start time of a contact (ISO 8601 UTC standard). - * - * @return the rxStartTime value. - */ - public OffsetDateTime rxStartTime() { - return this.rxStartTime; - } - - /** - * Get the rxEndTime property: Receive end time of a contact (ISO 8601 UTC standard). - * - * @return the rxEndTime value. - */ - public OffsetDateTime rxEndTime() { - return this.rxEndTime; - } - - /** - * Get the txStartTime property: Transmit start time of a contact (ISO 8601 UTC standard). - * - * @return the txStartTime value. - */ - public OffsetDateTime txStartTime() { - return this.txStartTime; - } - - /** - * Get the txEndTime property: Transmit end time of a contact (ISO 8601 UTC standard). - * - * @return the txEndTime value. - */ - public OffsetDateTime txEndTime() { - return this.txEndTime; - } - - /** - * Get the errorMessage property: Any error message while scheduling a contact. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.errorMessage; - } - - /** - * Get the maximumElevationDegrees property: Maximum elevation of the antenna during the contact in decimal degrees. - * - * @return the maximumElevationDegrees value. - */ - public Float maximumElevationDegrees() { - return this.maximumElevationDegrees; - } - - /** - * Get the startAzimuthDegrees property: Azimuth of the antenna at the start of the contact in decimal degrees. - * - * @return the startAzimuthDegrees value. - */ - public Float startAzimuthDegrees() { - return this.startAzimuthDegrees; - } - - /** - * Get the endAzimuthDegrees property: Azimuth of the antenna at the end of the contact in decimal degrees. - * - * @return the endAzimuthDegrees value. - */ - public Float endAzimuthDegrees() { - return this.endAzimuthDegrees; - } - - /** - * Get the groundStationName property: Azure Ground Station name. - * - * @return the groundStationName value. - */ - public String groundStationName() { - return this.groundStationName; - } - - /** - * Set the groundStationName property: Azure Ground Station name. - * - * @param groundStationName the groundStationName value to set. - * @return the ContactsProperties object itself. - */ - public ContactsProperties withGroundStationName(String groundStationName) { - this.groundStationName = groundStationName; - return this; - } - - /** - * Get the startElevationDegrees property: Spacecraft elevation above the horizon at contact start. - * - * @return the startElevationDegrees value. - */ - public Float startElevationDegrees() { - return this.startElevationDegrees; - } - - /** - * Get the endElevationDegrees property: Spacecraft elevation above the horizon at contact end. - * - * @return the endElevationDegrees value. - */ - public Float endElevationDegrees() { - return this.endElevationDegrees; - } - - /** - * Get the antennaConfiguration property: The configuration associated with the allocated antenna. - * - * @return the antennaConfiguration value. - */ - public ContactsPropertiesAntennaConfiguration antennaConfiguration() { - return this.antennaConfiguration; - } - - /** - * Get the contactProfile property: The reference to the contact profile resource. - * - * @return the contactProfile value. - */ - public ContactsPropertiesContactProfile contactProfile() { - return this.contactProfile; - } - - /** - * Set the contactProfile property: The reference to the contact profile resource. - * - * @param contactProfile the contactProfile value to set. - * @return the ContactsProperties object itself. - */ - public ContactsProperties withContactProfile(ContactsPropertiesContactProfile contactProfile) { - this.contactProfile = contactProfile; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (reservationStartTime() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property reservationStartTime in model ContactsProperties")); - } - if (reservationEndTime() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property reservationEndTime in model ContactsProperties")); - } - if (groundStationName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property groundStationName in model ContactsProperties")); - } - if (antennaConfiguration() != null) { - antennaConfiguration().validate(); - } - if (contactProfile() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property contactProfile in model ContactsProperties")); - } else { - contactProfile().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContactsProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("reservationStartTime", - this.reservationStartTime == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.reservationStartTime)); - jsonWriter.writeStringField("reservationEndTime", - this.reservationEndTime == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.reservationEndTime)); - jsonWriter.writeStringField("groundStationName", this.groundStationName); - jsonWriter.writeJsonField("contactProfile", this.contactProfile); - jsonWriter.writeStringField("provisioningState", - this.provisioningState == null ? null : this.provisioningState.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContactsProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContactsProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ContactsProperties. - */ - public static ContactsProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContactsProperties deserializedContactsProperties = new ContactsProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("reservationStartTime".equals(fieldName)) { - deserializedContactsProperties.reservationStartTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("reservationEndTime".equals(fieldName)) { - deserializedContactsProperties.reservationEndTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("groundStationName".equals(fieldName)) { - deserializedContactsProperties.groundStationName = reader.getString(); - } else if ("contactProfile".equals(fieldName)) { - deserializedContactsProperties.contactProfile = ContactsPropertiesContactProfile.fromJson(reader); - } else if ("provisioningState".equals(fieldName)) { - deserializedContactsProperties.provisioningState - = ContactsPropertiesProvisioningState.fromString(reader.getString()); - } else if ("status".equals(fieldName)) { - deserializedContactsProperties.status = ContactsStatus.fromString(reader.getString()); - } else if ("rxStartTime".equals(fieldName)) { - deserializedContactsProperties.rxStartTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("rxEndTime".equals(fieldName)) { - deserializedContactsProperties.rxEndTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("txStartTime".equals(fieldName)) { - deserializedContactsProperties.txStartTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("txEndTime".equals(fieldName)) { - deserializedContactsProperties.txEndTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("errorMessage".equals(fieldName)) { - deserializedContactsProperties.errorMessage = reader.getString(); - } else if ("maximumElevationDegrees".equals(fieldName)) { - deserializedContactsProperties.maximumElevationDegrees = reader.getNullable(JsonReader::getFloat); - } else if ("startAzimuthDegrees".equals(fieldName)) { - deserializedContactsProperties.startAzimuthDegrees = reader.getNullable(JsonReader::getFloat); - } else if ("endAzimuthDegrees".equals(fieldName)) { - deserializedContactsProperties.endAzimuthDegrees = reader.getNullable(JsonReader::getFloat); - } else if ("startElevationDegrees".equals(fieldName)) { - deserializedContactsProperties.startElevationDegrees = reader.getNullable(JsonReader::getFloat); - } else if ("endElevationDegrees".equals(fieldName)) { - deserializedContactsProperties.endElevationDegrees = reader.getNullable(JsonReader::getFloat); - } else if ("antennaConfiguration".equals(fieldName)) { - deserializedContactsProperties.antennaConfiguration - = ContactsPropertiesAntennaConfiguration.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedContactsProperties; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/OperationInner.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/OperationInner.java deleted file mode 100644 index e370d7516f51..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/OperationInner.java +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.orbital.models.ActionType; -import com.azure.resourcemanager.orbital.models.OperationDisplay; -import com.azure.resourcemanager.orbital.models.Origin; -import java.io.IOException; - -/** - * REST API Operation - * - * Details of a REST API operation, returned from the Resource Provider Operations API. - */ -@Fluent -public final class OperationInner implements JsonSerializable { - /* - * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" - */ - private String name; - - /* - * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for - * ARM/control-plane operations. - */ - private Boolean isDataAction; - - /* - * Localized display information for this particular operation. - */ - private OperationDisplay display; - - /* - * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default - * value is "user,system" - */ - private Origin origin; - - /* - * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - */ - private ActionType actionType; - - /** - * Creates an instance of OperationInner class. - */ - public OperationInner() { - } - - /** - * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for ARM/control-plane operations. - * - * @return the isDataAction value. - */ - public Boolean isDataAction() { - return this.isDataAction; - } - - /** - * Get the display property: Localized display information for this particular operation. - * - * @return the display value. - */ - public OperationDisplay display() { - return this.display; - } - - /** - * Set the display property: Localized display information for this particular operation. - * - * @param display the display value to set. - * @return the OperationInner object itself. - */ - public OperationInner withDisplay(OperationDisplay display) { - this.display = display; - return this; - } - - /** - * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and - * audit logs UX. Default value is "user,system". - * - * @return the origin value. - */ - public Origin origin() { - return this.origin; - } - - /** - * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal - * only APIs. - * - * @return the actionType value. - */ - public ActionType actionType() { - return this.actionType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (display() != null) { - display().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("display", this.display); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationInner. - */ - public static OperationInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationInner deserializedOperationInner = new OperationInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedOperationInner.name = reader.getString(); - } else if ("isDataAction".equals(fieldName)) { - deserializedOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean); - } else if ("display".equals(fieldName)) { - deserializedOperationInner.display = OperationDisplay.fromJson(reader); - } else if ("origin".equals(fieldName)) { - deserializedOperationInner.origin = Origin.fromString(reader.getString()); - } else if ("actionType".equals(fieldName)) { - deserializedOperationInner.actionType = ActionType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationInner; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/OperationResultInner.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/OperationResultInner.java deleted file mode 100644 index e73889495416..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/OperationResultInner.java +++ /dev/null @@ -1,260 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.orbital.models.OperationResultErrorProperties; -import com.azure.resourcemanager.orbital.models.Status; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * Operation Result Entity. - */ -@Fluent -public final class OperationResultInner implements JsonSerializable { - /* - * ID of the resource. - */ - private String id; - - /* - * Name of the resource. - */ - private String name; - - /* - * The status of operation. - */ - private Status status; - - /* - * The operation start time (ISO 8601 UTC standard). - */ - private OffsetDateTime startTime; - - /* - * The operation end time (ISO 8601 UTC standard). - */ - private OffsetDateTime endTime; - - /* - * Percentage completed. - */ - private Double percentComplete; - - /* - * A list of results when the operation returns multiple results. - */ - private List value; - - /* - * The URL to get the next set of results. - */ - private String nextLink; - - /* - * Operation result properties. - */ - private Object properties; - - /* - * Operation result error properties. - */ - private OperationResultErrorProperties error; - - /** - * Creates an instance of OperationResultInner class. - */ - public OperationResultInner() { - } - - /** - * Get the id property: ID of the resource. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the name property: Name of the resource. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the status property: The status of operation. - * - * @return the status value. - */ - public Status status() { - return this.status; - } - - /** - * Get the startTime property: The operation start time (ISO 8601 UTC standard). - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Get the endTime property: The operation end time (ISO 8601 UTC standard). - * - * @return the endTime value. - */ - public OffsetDateTime endTime() { - return this.endTime; - } - - /** - * Get the percentComplete property: Percentage completed. - * - * @return the percentComplete value. - */ - public Double percentComplete() { - return this.percentComplete; - } - - /** - * Get the value property: A list of results when the operation returns multiple results. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The URL to get the next set of results. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Get the properties property: Operation result properties. - * - * @return the properties value. - */ - public Object properties() { - return this.properties; - } - - /** - * Set the properties property: Operation result properties. - * - * @param properties the properties value to set. - * @return the OperationResultInner object itself. - */ - public OperationResultInner withProperties(Object properties) { - this.properties = properties; - return this; - } - - /** - * Get the error property: Operation result error properties. - * - * @return the error value. - */ - public OperationResultErrorProperties error() { - return this.error; - } - - /** - * Set the error property: Operation result error properties. - * - * @param error the error value to set. - * @return the OperationResultInner object itself. - */ - public OperationResultInner withError(OperationResultErrorProperties error) { - this.error = error; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (error() != null) { - error().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeUntypedField("properties", this.properties); - jsonWriter.writeJsonField("error", this.error); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationResultInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationResultInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationResultInner. - */ - public static OperationResultInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationResultInner deserializedOperationResultInner = new OperationResultInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedOperationResultInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedOperationResultInner.name = reader.getString(); - } else if ("status".equals(fieldName)) { - deserializedOperationResultInner.status = Status.fromString(reader.getString()); - } else if ("startTime".equals(fieldName)) { - deserializedOperationResultInner.startTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("endTime".equals(fieldName)) { - deserializedOperationResultInner.endTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("percentComplete".equals(fieldName)) { - deserializedOperationResultInner.percentComplete = reader.getNullable(JsonReader::getDouble); - } else if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> reader1.readUntyped()); - deserializedOperationResultInner.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedOperationResultInner.nextLink = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedOperationResultInner.properties = reader.readUntyped(); - } else if ("error".equals(fieldName)) { - deserializedOperationResultInner.error = OperationResultErrorProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationResultInner; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/SpacecraftInner.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/SpacecraftInner.java deleted file mode 100644 index 07e75bc5f8bb..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/SpacecraftInner.java +++ /dev/null @@ -1,328 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.orbital.models.SpacecraftLink; -import com.azure.resourcemanager.orbital.models.SpacecraftsPropertiesProvisioningState; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * Customer creates a spacecraft resource to schedule a contact. - */ -@Fluent -public final class SpacecraftInner extends Resource { - /* - * Spacecraft Properties - */ - private SpacecraftsProperties innerProperties = new SpacecraftsProperties(); - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of SpacecraftInner class. - */ - public SpacecraftInner() { - } - - /** - * Get the innerProperties property: Spacecraft Properties. - * - * @return the innerProperties value. - */ - private SpacecraftsProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public SpacecraftInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpacecraftInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the provisioningState property: The current state of the resource's creation, deletion, or modification. - * - * @return the provisioningState value. - */ - public SpacecraftsPropertiesProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Set the provisioningState property: The current state of the resource's creation, deletion, or modification. - * - * @param provisioningState the provisioningState value to set. - * @return the SpacecraftInner object itself. - */ - public SpacecraftInner withProvisioningState(SpacecraftsPropertiesProvisioningState provisioningState) { - if (this.innerProperties() == null) { - this.innerProperties = new SpacecraftsProperties(); - } - this.innerProperties().withProvisioningState(provisioningState); - return this; - } - - /** - * Get the noradId property: NORAD ID of the spacecraft. - * - * @return the noradId value. - */ - public String noradId() { - return this.innerProperties() == null ? null : this.innerProperties().noradId(); - } - - /** - * Set the noradId property: NORAD ID of the spacecraft. - * - * @param noradId the noradId value to set. - * @return the SpacecraftInner object itself. - */ - public SpacecraftInner withNoradId(String noradId) { - if (this.innerProperties() == null) { - this.innerProperties = new SpacecraftsProperties(); - } - this.innerProperties().withNoradId(noradId); - return this; - } - - /** - * Get the titleLine property: Title line of the two-line element set (TLE). - * - * @return the titleLine value. - */ - public String titleLine() { - return this.innerProperties() == null ? null : this.innerProperties().titleLine(); - } - - /** - * Set the titleLine property: Title line of the two-line element set (TLE). - * - * @param titleLine the titleLine value to set. - * @return the SpacecraftInner object itself. - */ - public SpacecraftInner withTitleLine(String titleLine) { - if (this.innerProperties() == null) { - this.innerProperties = new SpacecraftsProperties(); - } - this.innerProperties().withTitleLine(titleLine); - return this; - } - - /** - * Get the tleLine1 property: Line 1 of the two-line element set (TLE). - * - * @return the tleLine1 value. - */ - public String tleLine1() { - return this.innerProperties() == null ? null : this.innerProperties().tleLine1(); - } - - /** - * Set the tleLine1 property: Line 1 of the two-line element set (TLE). - * - * @param tleLine1 the tleLine1 value to set. - * @return the SpacecraftInner object itself. - */ - public SpacecraftInner withTleLine1(String tleLine1) { - if (this.innerProperties() == null) { - this.innerProperties = new SpacecraftsProperties(); - } - this.innerProperties().withTleLine1(tleLine1); - return this; - } - - /** - * Get the tleLine2 property: Line 2 of the two-line element set (TLE). - * - * @return the tleLine2 value. - */ - public String tleLine2() { - return this.innerProperties() == null ? null : this.innerProperties().tleLine2(); - } - - /** - * Set the tleLine2 property: Line 2 of the two-line element set (TLE). - * - * @param tleLine2 the tleLine2 value to set. - * @return the SpacecraftInner object itself. - */ - public SpacecraftInner withTleLine2(String tleLine2) { - if (this.innerProperties() == null) { - this.innerProperties = new SpacecraftsProperties(); - } - this.innerProperties().withTleLine2(tleLine2); - return this; - } - - /** - * Get the links property: Immutable list of Spacecraft links. - * - * @return the links value. - */ - public List links() { - return this.innerProperties() == null ? null : this.innerProperties().links(); - } - - /** - * Set the links property: Immutable list of Spacecraft links. - * - * @param links the links value to set. - * @return the SpacecraftInner object itself. - */ - public SpacecraftInner withLinks(List links) { - if (this.innerProperties() == null) { - this.innerProperties = new SpacecraftsProperties(); - } - this.innerProperties().withLinks(links); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property innerProperties in model SpacecraftInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SpacecraftInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SpacecraftInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SpacecraftInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SpacecraftInner. - */ - public static SpacecraftInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SpacecraftInner deserializedSpacecraftInner = new SpacecraftInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedSpacecraftInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedSpacecraftInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedSpacecraftInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedSpacecraftInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedSpacecraftInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedSpacecraftInner.innerProperties = SpacecraftsProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedSpacecraftInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedSpacecraftInner; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/SpacecraftsProperties.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/SpacecraftsProperties.java deleted file mode 100644 index c12f3f140c99..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/SpacecraftsProperties.java +++ /dev/null @@ -1,262 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.orbital.models.SpacecraftLink; -import com.azure.resourcemanager.orbital.models.SpacecraftsPropertiesProvisioningState; -import java.io.IOException; -import java.util.List; - -/** - * List of Spacecraft Resource Properties. - */ -@Fluent -public final class SpacecraftsProperties implements JsonSerializable { - /* - * The current state of the resource's creation, deletion, or modification. - */ - private SpacecraftsPropertiesProvisioningState provisioningState; - - /* - * NORAD ID of the spacecraft. - */ - private String noradId; - - /* - * Title line of the two-line element set (TLE). - */ - private String titleLine; - - /* - * Line 1 of the two-line element set (TLE). - */ - private String tleLine1; - - /* - * Line 2 of the two-line element set (TLE). - */ - private String tleLine2; - - /* - * Immutable list of Spacecraft links. - */ - private List links; - - /** - * Creates an instance of SpacecraftsProperties class. - */ - public SpacecraftsProperties() { - } - - /** - * Get the provisioningState property: The current state of the resource's creation, deletion, or modification. - * - * @return the provisioningState value. - */ - public SpacecraftsPropertiesProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState property: The current state of the resource's creation, deletion, or modification. - * - * @param provisioningState the provisioningState value to set. - * @return the SpacecraftsProperties object itself. - */ - public SpacecraftsProperties withProvisioningState(SpacecraftsPropertiesProvisioningState provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the noradId property: NORAD ID of the spacecraft. - * - * @return the noradId value. - */ - public String noradId() { - return this.noradId; - } - - /** - * Set the noradId property: NORAD ID of the spacecraft. - * - * @param noradId the noradId value to set. - * @return the SpacecraftsProperties object itself. - */ - public SpacecraftsProperties withNoradId(String noradId) { - this.noradId = noradId; - return this; - } - - /** - * Get the titleLine property: Title line of the two-line element set (TLE). - * - * @return the titleLine value. - */ - public String titleLine() { - return this.titleLine; - } - - /** - * Set the titleLine property: Title line of the two-line element set (TLE). - * - * @param titleLine the titleLine value to set. - * @return the SpacecraftsProperties object itself. - */ - public SpacecraftsProperties withTitleLine(String titleLine) { - this.titleLine = titleLine; - return this; - } - - /** - * Get the tleLine1 property: Line 1 of the two-line element set (TLE). - * - * @return the tleLine1 value. - */ - public String tleLine1() { - return this.tleLine1; - } - - /** - * Set the tleLine1 property: Line 1 of the two-line element set (TLE). - * - * @param tleLine1 the tleLine1 value to set. - * @return the SpacecraftsProperties object itself. - */ - public SpacecraftsProperties withTleLine1(String tleLine1) { - this.tleLine1 = tleLine1; - return this; - } - - /** - * Get the tleLine2 property: Line 2 of the two-line element set (TLE). - * - * @return the tleLine2 value. - */ - public String tleLine2() { - return this.tleLine2; - } - - /** - * Set the tleLine2 property: Line 2 of the two-line element set (TLE). - * - * @param tleLine2 the tleLine2 value to set. - * @return the SpacecraftsProperties object itself. - */ - public SpacecraftsProperties withTleLine2(String tleLine2) { - this.tleLine2 = tleLine2; - return this; - } - - /** - * Get the links property: Immutable list of Spacecraft links. - * - * @return the links value. - */ - public List links() { - return this.links; - } - - /** - * Set the links property: Immutable list of Spacecraft links. - * - * @param links the links value to set. - * @return the SpacecraftsProperties object itself. - */ - public SpacecraftsProperties withLinks(List links) { - this.links = links; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (titleLine() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property titleLine in model SpacecraftsProperties")); - } - if (tleLine1() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property tleLine1 in model SpacecraftsProperties")); - } - if (tleLine2() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property tleLine2 in model SpacecraftsProperties")); - } - if (links() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property links in model SpacecraftsProperties")); - } else { - links().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SpacecraftsProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("titleLine", this.titleLine); - jsonWriter.writeStringField("tleLine1", this.tleLine1); - jsonWriter.writeStringField("tleLine2", this.tleLine2); - jsonWriter.writeArrayField("links", this.links, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("provisioningState", - this.provisioningState == null ? null : this.provisioningState.toString()); - jsonWriter.writeStringField("noradId", this.noradId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SpacecraftsProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SpacecraftsProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SpacecraftsProperties. - */ - public static SpacecraftsProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SpacecraftsProperties deserializedSpacecraftsProperties = new SpacecraftsProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("titleLine".equals(fieldName)) { - deserializedSpacecraftsProperties.titleLine = reader.getString(); - } else if ("tleLine1".equals(fieldName)) { - deserializedSpacecraftsProperties.tleLine1 = reader.getString(); - } else if ("tleLine2".equals(fieldName)) { - deserializedSpacecraftsProperties.tleLine2 = reader.getString(); - } else if ("links".equals(fieldName)) { - List links = reader.readArray(reader1 -> SpacecraftLink.fromJson(reader1)); - deserializedSpacecraftsProperties.links = links; - } else if ("provisioningState".equals(fieldName)) { - deserializedSpacecraftsProperties.provisioningState - = SpacecraftsPropertiesProvisioningState.fromString(reader.getString()); - } else if ("noradId".equals(fieldName)) { - deserializedSpacecraftsProperties.noradId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSpacecraftsProperties; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/package-info.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/package-info.java deleted file mode 100644 index bcf0fa7bc832..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the inner data models for AzureOrbital. - * Azure Orbital service. - */ -package com.azure.resourcemanager.orbital.fluent.models; diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/package-info.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/package-info.java deleted file mode 100644 index 4d40126fc020..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the service clients for AzureOrbital. - * Azure Orbital service. - */ -package com.azure.resourcemanager.orbital.fluent; diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/AvailableContactsImpl.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/AvailableContactsImpl.java deleted file mode 100644 index 5cc08bb33119..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/AvailableContactsImpl.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.implementation; - -import com.azure.resourcemanager.orbital.fluent.models.AvailableContactsInner; -import com.azure.resourcemanager.orbital.models.AvailableContacts; -import com.azure.resourcemanager.orbital.models.AvailableContactsSpacecraft; -import java.time.OffsetDateTime; - -public final class AvailableContactsImpl implements AvailableContacts { - private AvailableContactsInner innerObject; - - private final com.azure.resourcemanager.orbital.OrbitalManager serviceManager; - - AvailableContactsImpl(AvailableContactsInner innerObject, - com.azure.resourcemanager.orbital.OrbitalManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public AvailableContactsSpacecraft spacecraft() { - return this.innerModel().spacecraft(); - } - - public String groundStationName() { - return this.innerModel().groundStationName(); - } - - public Float maximumElevationDegrees() { - return this.innerModel().maximumElevationDegrees(); - } - - public OffsetDateTime txStartTime() { - return this.innerModel().txStartTime(); - } - - public OffsetDateTime txEndTime() { - return this.innerModel().txEndTime(); - } - - public OffsetDateTime rxStartTime() { - return this.innerModel().rxStartTime(); - } - - public OffsetDateTime rxEndTime() { - return this.innerModel().rxEndTime(); - } - - public Float startAzimuthDegrees() { - return this.innerModel().startAzimuthDegrees(); - } - - public Float endAzimuthDegrees() { - return this.innerModel().endAzimuthDegrees(); - } - - public Float startElevationDegrees() { - return this.innerModel().startElevationDegrees(); - } - - public Float endElevationDegrees() { - return this.innerModel().endElevationDegrees(); - } - - public AvailableContactsInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.orbital.OrbitalManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/AvailableGroundStationImpl.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/AvailableGroundStationImpl.java deleted file mode 100644 index 1045d42da432..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/AvailableGroundStationImpl.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.implementation; - -import com.azure.resourcemanager.orbital.fluent.models.AvailableGroundStationInner; -import com.azure.resourcemanager.orbital.models.AvailableGroundStation; -import com.azure.resourcemanager.orbital.models.ReleaseMode; - -public final class AvailableGroundStationImpl implements AvailableGroundStation { - private AvailableGroundStationInner innerObject; - - private final com.azure.resourcemanager.orbital.OrbitalManager serviceManager; - - AvailableGroundStationImpl(AvailableGroundStationInner innerObject, - com.azure.resourcemanager.orbital.OrbitalManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String location() { - return this.innerModel().location(); - } - - public String type() { - return this.innerModel().type(); - } - - public String city() { - return this.innerModel().city(); - } - - public String providerName() { - return this.innerModel().providerName(); - } - - public Float longitudeDegrees() { - return this.innerModel().longitudeDegrees(); - } - - public Float latitudeDegrees() { - return this.innerModel().latitudeDegrees(); - } - - public Float altitudeMeters() { - return this.innerModel().altitudeMeters(); - } - - public ReleaseMode releaseMode() { - return this.innerModel().releaseMode(); - } - - public AvailableGroundStationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.orbital.OrbitalManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/AvailableGroundStationsClientImpl.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/AvailableGroundStationsClientImpl.java deleted file mode 100644 index 01bcec5be102..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/AvailableGroundStationsClientImpl.java +++ /dev/null @@ -1,266 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.orbital.fluent.AvailableGroundStationsClient; -import com.azure.resourcemanager.orbital.fluent.models.AvailableGroundStationInner; -import com.azure.resourcemanager.orbital.models.AvailableGroundStationListResult; -import com.azure.resourcemanager.orbital.models.CapabilityParameter; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in AvailableGroundStationsClient. - */ -public final class AvailableGroundStationsClientImpl implements AvailableGroundStationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final AvailableGroundStationsService service; - - /** - * The service client containing this operation class. - */ - private final AzureOrbitalImpl client; - - /** - * Initializes an instance of AvailableGroundStationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - AvailableGroundStationsClientImpl(AzureOrbitalImpl client) { - this.service = RestProxy.create(AvailableGroundStationsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureOrbitalAvailableGroundStations to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureOrbitalAvailabl") - public interface AvailableGroundStationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Orbital/availableGroundStations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @QueryParam("capability") CapabilityParameter capability, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByCapabilityNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Returns list of available ground stations. - * - * @param capability Ground Station Capability. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the AvailableGroundStations API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(CapabilityParameter capability) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (capability == null) { - return Mono.error(new IllegalArgumentException("Parameter capability is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), capability, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Returns list of available ground stations. - * - * @param capability Ground Station Capability. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the AvailableGroundStations API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(CapabilityParameter capability, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (capability == null) { - return Mono.error(new IllegalArgumentException("Parameter capability is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), capability, - accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Returns list of available ground stations. - * - * @param capability Ground Station Capability. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the AvailableGroundStations API service call as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(CapabilityParameter capability) { - return new PagedFlux<>(() -> listSinglePageAsync(capability), - nextLink -> listByCapabilityNextSinglePageAsync(nextLink)); - } - - /** - * Returns list of available ground stations. - * - * @param capability Ground Station Capability. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the AvailableGroundStations API service call as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(CapabilityParameter capability, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(capability, context), - nextLink -> listByCapabilityNextSinglePageAsync(nextLink, context)); - } - - /** - * Returns list of available ground stations. - * - * @param capability Ground Station Capability. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the AvailableGroundStations API service call as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(CapabilityParameter capability) { - return new PagedIterable<>(listAsync(capability)); - } - - /** - * Returns list of available ground stations. - * - * @param capability Ground Station Capability. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the AvailableGroundStations API service call as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(CapabilityParameter capability, Context context) { - return new PagedIterable<>(listAsync(capability, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the AvailableGroundStations API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByCapabilityNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByCapabilityNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the AvailableGroundStations API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByCapabilityNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByCapabilityNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/AvailableGroundStationsImpl.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/AvailableGroundStationsImpl.java deleted file mode 100644 index ec35e24e71d2..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/AvailableGroundStationsImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.orbital.fluent.AvailableGroundStationsClient; -import com.azure.resourcemanager.orbital.fluent.models.AvailableGroundStationInner; -import com.azure.resourcemanager.orbital.models.AvailableGroundStation; -import com.azure.resourcemanager.orbital.models.AvailableGroundStations; -import com.azure.resourcemanager.orbital.models.CapabilityParameter; - -public final class AvailableGroundStationsImpl implements AvailableGroundStations { - private static final ClientLogger LOGGER = new ClientLogger(AvailableGroundStationsImpl.class); - - private final AvailableGroundStationsClient innerClient; - - private final com.azure.resourcemanager.orbital.OrbitalManager serviceManager; - - public AvailableGroundStationsImpl(AvailableGroundStationsClient innerClient, - com.azure.resourcemanager.orbital.OrbitalManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(CapabilityParameter capability) { - PagedIterable inner = this.serviceClient().list(capability); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AvailableGroundStationImpl(inner1, this.manager())); - } - - public PagedIterable list(CapabilityParameter capability, Context context) { - PagedIterable inner = this.serviceClient().list(capability, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AvailableGroundStationImpl(inner1, this.manager())); - } - - private AvailableGroundStationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.orbital.OrbitalManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/AzureOrbitalBuilder.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/AzureOrbitalBuilder.java deleted file mode 100644 index e0c4591e46e1..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/AzureOrbitalBuilder.java +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.implementation; - -import com.azure.core.annotation.ServiceClientBuilder; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerAdapter; -import java.time.Duration; - -/** - * A builder for creating a new instance of the AzureOrbitalImpl type. - */ -@ServiceClientBuilder(serviceClients = { AzureOrbitalImpl.class }) -public final class AzureOrbitalBuilder { - /* - * The ID of the target subscription. - */ - private String subscriptionId; - - /** - * Sets The ID of the target subscription. - * - * @param subscriptionId the subscriptionId value. - * @return the AzureOrbitalBuilder. - */ - public AzureOrbitalBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /* - * server parameter - */ - private String endpoint; - - /** - * Sets server parameter. - * - * @param endpoint the endpoint value. - * @return the AzureOrbitalBuilder. - */ - public AzureOrbitalBuilder endpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /* - * The environment to connect to - */ - private AzureEnvironment environment; - - /** - * Sets The environment to connect to. - * - * @param environment the environment value. - * @return the AzureOrbitalBuilder. - */ - public AzureOrbitalBuilder environment(AzureEnvironment environment) { - this.environment = environment; - return this; - } - - /* - * The HTTP pipeline to send requests through - */ - private HttpPipeline pipeline; - - /** - * Sets The HTTP pipeline to send requests through. - * - * @param pipeline the pipeline value. - * @return the AzureOrbitalBuilder. - */ - public AzureOrbitalBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; - return this; - } - - /* - * The default poll interval for long-running operation - */ - private Duration defaultPollInterval; - - /** - * Sets The default poll interval for long-running operation. - * - * @param defaultPollInterval the defaultPollInterval value. - * @return the AzureOrbitalBuilder. - */ - public AzureOrbitalBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; - return this; - } - - /* - * The serializer to serialize an object into a string - */ - private SerializerAdapter serializerAdapter; - - /** - * Sets The serializer to serialize an object into a string. - * - * @param serializerAdapter the serializerAdapter value. - * @return the AzureOrbitalBuilder. - */ - public AzureOrbitalBuilder serializerAdapter(SerializerAdapter serializerAdapter) { - this.serializerAdapter = serializerAdapter; - return this; - } - - /** - * Builds an instance of AzureOrbitalImpl with the provided parameters. - * - * @return an instance of AzureOrbitalImpl. - */ - public AzureOrbitalImpl buildClient() { - String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; - AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = (pipeline != null) - ? pipeline - : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - Duration localDefaultPollInterval - = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = (serializerAdapter != null) - ? serializerAdapter - : SerializerFactory.createDefaultManagementSerializerAdapter(); - AzureOrbitalImpl client = new AzureOrbitalImpl(localPipeline, localSerializerAdapter, localDefaultPollInterval, - localEnvironment, this.subscriptionId, localEndpoint); - return client; - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/AzureOrbitalImpl.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/AzureOrbitalImpl.java deleted file mode 100644 index 864ba0a8e1ae..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/AzureOrbitalImpl.java +++ /dev/null @@ -1,368 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.implementation; - -import com.azure.core.annotation.ServiceClient; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.Response; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.management.polling.PollerFactory; -import com.azure.core.util.Context; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.AsyncPollResponse; -import com.azure.core.util.polling.LongRunningOperationStatus; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.orbital.fluent.AvailableGroundStationsClient; -import com.azure.resourcemanager.orbital.fluent.AzureOrbital; -import com.azure.resourcemanager.orbital.fluent.ContactProfilesClient; -import com.azure.resourcemanager.orbital.fluent.ContactsClient; -import com.azure.resourcemanager.orbital.fluent.OperationsClient; -import com.azure.resourcemanager.orbital.fluent.OperationsResultsClient; -import com.azure.resourcemanager.orbital.fluent.SpacecraftsClient; -import java.io.IOException; -import java.lang.reflect.Type; -import java.nio.ByteBuffer; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.time.Duration; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * Initializes a new instance of the AzureOrbitalImpl type. - */ -@ServiceClient(builder = AzureOrbitalBuilder.class) -public final class AzureOrbitalImpl implements AzureOrbital { - /** - * The ID of the target subscription. - */ - private final String subscriptionId; - - /** - * Gets The ID of the target subscription. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** - * server parameter. - */ - private final String endpoint; - - /** - * Gets server parameter. - * - * @return the endpoint value. - */ - public String getEndpoint() { - return this.endpoint; - } - - /** - * Api Version. - */ - private final String apiVersion; - - /** - * Gets Api Version. - * - * @return the apiVersion value. - */ - public String getApiVersion() { - return this.apiVersion; - } - - /** - * The HTTP pipeline to send requests through. - */ - private final HttpPipeline httpPipeline; - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - public HttpPipeline getHttpPipeline() { - return this.httpPipeline; - } - - /** - * The serializer to serialize an object into a string. - */ - private final SerializerAdapter serializerAdapter; - - /** - * Gets The serializer to serialize an object into a string. - * - * @return the serializerAdapter value. - */ - SerializerAdapter getSerializerAdapter() { - return this.serializerAdapter; - } - - /** - * The default poll interval for long-running operation. - */ - private final Duration defaultPollInterval; - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - public Duration getDefaultPollInterval() { - return this.defaultPollInterval; - } - - /** - * The OperationsClient object to access its operations. - */ - private final OperationsClient operations; - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - public OperationsClient getOperations() { - return this.operations; - } - - /** - * The SpacecraftsClient object to access its operations. - */ - private final SpacecraftsClient spacecrafts; - - /** - * Gets the SpacecraftsClient object to access its operations. - * - * @return the SpacecraftsClient object. - */ - public SpacecraftsClient getSpacecrafts() { - return this.spacecrafts; - } - - /** - * The ContactsClient object to access its operations. - */ - private final ContactsClient contacts; - - /** - * Gets the ContactsClient object to access its operations. - * - * @return the ContactsClient object. - */ - public ContactsClient getContacts() { - return this.contacts; - } - - /** - * The ContactProfilesClient object to access its operations. - */ - private final ContactProfilesClient contactProfiles; - - /** - * Gets the ContactProfilesClient object to access its operations. - * - * @return the ContactProfilesClient object. - */ - public ContactProfilesClient getContactProfiles() { - return this.contactProfiles; - } - - /** - * The AvailableGroundStationsClient object to access its operations. - */ - private final AvailableGroundStationsClient availableGroundStations; - - /** - * Gets the AvailableGroundStationsClient object to access its operations. - * - * @return the AvailableGroundStationsClient object. - */ - public AvailableGroundStationsClient getAvailableGroundStations() { - return this.availableGroundStations; - } - - /** - * The OperationsResultsClient object to access its operations. - */ - private final OperationsResultsClient operationsResults; - - /** - * Gets the OperationsResultsClient object to access its operations. - * - * @return the OperationsResultsClient object. - */ - public OperationsResultsClient getOperationsResults() { - return this.operationsResults; - } - - /** - * Initializes an instance of AzureOrbital client. - * - * @param httpPipeline The HTTP pipeline to send requests through. - * @param serializerAdapter The serializer to serialize an object into a string. - * @param defaultPollInterval The default poll interval for long-running operation. - * @param environment The Azure environment. - * @param subscriptionId The ID of the target subscription. - * @param endpoint server parameter. - */ - AzureOrbitalImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval, - AzureEnvironment environment, String subscriptionId, String endpoint) { - this.httpPipeline = httpPipeline; - this.serializerAdapter = serializerAdapter; - this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; - this.endpoint = endpoint; - this.apiVersion = "2022-11-01"; - this.operations = new OperationsClientImpl(this); - this.spacecrafts = new SpacecraftsClientImpl(this); - this.contacts = new ContactsClientImpl(this); - this.contactProfiles = new ContactProfilesClientImpl(this); - this.availableGroundStations = new AvailableGroundStationsClientImpl(this); - this.operationsResults = new OperationsResultsClientImpl(this); - } - - /** - * Gets default client context. - * - * @return the default client context. - */ - public Context getContext() { - return Context.NONE; - } - - /** - * Merges default client context with provided context. - * - * @param context the context to be merged with default client context. - * @return the merged context. - */ - public Context mergeContext(Context context) { - return CoreUtils.mergeContexts(this.getContext(), context); - } - - /** - * Gets long running operation result. - * - * @param activationResponse the response of activation operation. - * @param httpPipeline the http pipeline. - * @param pollResultType type of poll result. - * @param finalResultType type of final result. - * @param context the context shared by all requests. - * @param type of poll result. - * @param type of final result. - * @return poller flux for poll result and final result. - */ - public PollerFlux, U> getLroResult(Mono>> activationResponse, - HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { - return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, - defaultPollInterval, activationResponse, context); - } - - /** - * Gets the final result, or an error, based on last async poll response. - * - * @param response the last async poll response. - * @param type of poll result. - * @param type of final result. - * @return the final result, or an error. - */ - public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { - if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { - String errorMessage; - ManagementError managementError = null; - HttpResponse errorResponse = null; - PollResult.Error lroError = response.getValue().getError(); - if (lroError != null) { - errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), - lroError.getResponseBody()); - - errorMessage = response.getValue().getError().getMessage(); - String errorBody = response.getValue().getError().getResponseBody(); - if (errorBody != null) { - // try to deserialize error body to ManagementError - try { - managementError = this.getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); - if (managementError.getCode() == null || managementError.getMessage() == null) { - managementError = null; - } - } catch (IOException | RuntimeException ioe) { - LOGGER.logThrowableAsWarning(ioe); - } - } - } else { - // fallback to default error message - errorMessage = "Long running operation failed."; - } - if (managementError == null) { - // fallback to default ManagementError - managementError = new ManagementError(response.getStatus().toString(), errorMessage); - } - return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); - } else { - return response.getFinalResult(); - } - } - - private static final class HttpResponseImpl extends HttpResponse { - private final int statusCode; - - private final byte[] responseBody; - - private final HttpHeaders httpHeaders; - - HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) { - super(null); - this.statusCode = statusCode; - this.httpHeaders = httpHeaders; - this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); - } - - public int getStatusCode() { - return statusCode; - } - - public String getHeaderValue(String s) { - return httpHeaders.getValue(HttpHeaderName.fromString(s)); - } - - public HttpHeaders getHeaders() { - return httpHeaders; - } - - public Flux getBody() { - return Flux.just(ByteBuffer.wrap(responseBody)); - } - - public Mono getBodyAsByteArray() { - return Mono.just(responseBody); - } - - public Mono getBodyAsString() { - return Mono.just(new String(responseBody, StandardCharsets.UTF_8)); - } - - public Mono getBodyAsString(Charset charset) { - return Mono.just(new String(responseBody, charset)); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AzureOrbitalImpl.class); -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactImpl.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactImpl.java deleted file mode 100644 index 80cc2ccf7552..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactImpl.java +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.orbital.fluent.models.ContactInner; -import com.azure.resourcemanager.orbital.models.Contact; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesAntennaConfiguration; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesContactProfile; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesProvisioningState; -import com.azure.resourcemanager.orbital.models.ContactsStatus; -import java.time.OffsetDateTime; - -public final class ContactImpl implements Contact, Contact.Definition { - private ContactInner innerObject; - - private final com.azure.resourcemanager.orbital.OrbitalManager serviceManager; - - ContactImpl(ContactInner innerObject, com.azure.resourcemanager.orbital.OrbitalManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public ContactsPropertiesProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public ContactsStatus status() { - return this.innerModel().status(); - } - - public OffsetDateTime reservationStartTime() { - return this.innerModel().reservationStartTime(); - } - - public OffsetDateTime reservationEndTime() { - return this.innerModel().reservationEndTime(); - } - - public OffsetDateTime rxStartTime() { - return this.innerModel().rxStartTime(); - } - - public OffsetDateTime rxEndTime() { - return this.innerModel().rxEndTime(); - } - - public OffsetDateTime txStartTime() { - return this.innerModel().txStartTime(); - } - - public OffsetDateTime txEndTime() { - return this.innerModel().txEndTime(); - } - - public String errorMessage() { - return this.innerModel().errorMessage(); - } - - public Float maximumElevationDegrees() { - return this.innerModel().maximumElevationDegrees(); - } - - public Float startAzimuthDegrees() { - return this.innerModel().startAzimuthDegrees(); - } - - public Float endAzimuthDegrees() { - return this.innerModel().endAzimuthDegrees(); - } - - public String groundStationName() { - return this.innerModel().groundStationName(); - } - - public Float startElevationDegrees() { - return this.innerModel().startElevationDegrees(); - } - - public Float endElevationDegrees() { - return this.innerModel().endElevationDegrees(); - } - - public ContactsPropertiesAntennaConfiguration antennaConfiguration() { - return this.innerModel().antennaConfiguration(); - } - - public ContactsPropertiesContactProfile contactProfile() { - return this.innerModel().contactProfile(); - } - - public ContactInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.orbital.OrbitalManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String spacecraftName; - - private String contactName; - - public ContactImpl withExistingSpacecraft(String resourceGroupName, String spacecraftName) { - this.resourceGroupName = resourceGroupName; - this.spacecraftName = spacecraftName; - return this; - } - - public Contact create() { - this.innerObject = serviceManager.serviceClient() - .getContacts() - .create(resourceGroupName, spacecraftName, contactName, this.innerModel(), Context.NONE); - return this; - } - - public Contact create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getContacts() - .create(resourceGroupName, spacecraftName, contactName, this.innerModel(), context); - return this; - } - - ContactImpl(String name, com.azure.resourcemanager.orbital.OrbitalManager serviceManager) { - this.innerObject = new ContactInner(); - this.serviceManager = serviceManager; - this.contactName = name; - } - - public Contact refresh() { - this.innerObject = serviceManager.serviceClient() - .getContacts() - .getWithResponse(resourceGroupName, spacecraftName, contactName, Context.NONE) - .getValue(); - return this; - } - - public Contact refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getContacts() - .getWithResponse(resourceGroupName, spacecraftName, contactName, context) - .getValue(); - return this; - } - - public ContactImpl withReservationStartTime(OffsetDateTime reservationStartTime) { - this.innerModel().withReservationStartTime(reservationStartTime); - return this; - } - - public ContactImpl withReservationEndTime(OffsetDateTime reservationEndTime) { - this.innerModel().withReservationEndTime(reservationEndTime); - return this; - } - - public ContactImpl withGroundStationName(String groundStationName) { - this.innerModel().withGroundStationName(groundStationName); - return this; - } - - public ContactImpl withContactProfile(ContactsPropertiesContactProfile contactProfile) { - this.innerModel().withContactProfile(contactProfile); - return this; - } - - public ContactImpl withProvisioningState(ContactsPropertiesProvisioningState provisioningState) { - this.innerModel().withProvisioningState(provisioningState); - return this; - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactProfileImpl.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactProfileImpl.java deleted file mode 100644 index de9daeafbcf4..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactProfileImpl.java +++ /dev/null @@ -1,257 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.implementation; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.orbital.fluent.models.ContactProfileInner; -import com.azure.resourcemanager.orbital.models.AutoTrackingConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfile; -import com.azure.resourcemanager.orbital.models.ContactProfileLink; -import com.azure.resourcemanager.orbital.models.ContactProfileThirdPartyConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesNetworkConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesProvisioningState; -import com.azure.resourcemanager.orbital.models.TagsObject; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public final class ContactProfileImpl implements ContactProfile, ContactProfile.Definition, ContactProfile.Update { - private ContactProfileInner innerObject; - - private final com.azure.resourcemanager.orbital.OrbitalManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String location() { - return this.innerModel().location(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public ContactProfilesPropertiesProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public String minimumViableContactDuration() { - return this.innerModel().minimumViableContactDuration(); - } - - public Float minimumElevationDegrees() { - return this.innerModel().minimumElevationDegrees(); - } - - public AutoTrackingConfiguration autoTrackingConfiguration() { - return this.innerModel().autoTrackingConfiguration(); - } - - public String eventHubUri() { - return this.innerModel().eventHubUri(); - } - - public ContactProfilesPropertiesNetworkConfiguration networkConfiguration() { - return this.innerModel().networkConfiguration(); - } - - public List thirdPartyConfigurations() { - List inner = this.innerModel().thirdPartyConfigurations(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List links() { - List inner = this.innerModel().links(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ContactProfileInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.orbital.OrbitalManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String contactProfileName; - - private TagsObject updateParameters; - - public ContactProfileImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public ContactProfile create() { - this.innerObject = serviceManager.serviceClient() - .getContactProfiles() - .createOrUpdate(resourceGroupName, contactProfileName, this.innerModel(), Context.NONE); - return this; - } - - public ContactProfile create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getContactProfiles() - .createOrUpdate(resourceGroupName, contactProfileName, this.innerModel(), context); - return this; - } - - ContactProfileImpl(String name, com.azure.resourcemanager.orbital.OrbitalManager serviceManager) { - this.innerObject = new ContactProfileInner(); - this.serviceManager = serviceManager; - this.contactProfileName = name; - } - - public ContactProfileImpl update() { - this.updateParameters = new TagsObject(); - return this; - } - - public ContactProfile apply() { - this.innerObject = serviceManager.serviceClient() - .getContactProfiles() - .updateTags(resourceGroupName, contactProfileName, updateParameters, Context.NONE); - return this; - } - - public ContactProfile apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getContactProfiles() - .updateTags(resourceGroupName, contactProfileName, updateParameters, context); - return this; - } - - ContactProfileImpl(ContactProfileInner innerObject, - com.azure.resourcemanager.orbital.OrbitalManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.contactProfileName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "contactProfiles"); - } - - public ContactProfile refresh() { - this.innerObject = serviceManager.serviceClient() - .getContactProfiles() - .getByResourceGroupWithResponse(resourceGroupName, contactProfileName, Context.NONE) - .getValue(); - return this; - } - - public ContactProfile refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getContactProfiles() - .getByResourceGroupWithResponse(resourceGroupName, contactProfileName, context) - .getValue(); - return this; - } - - public ContactProfileImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public ContactProfileImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public ContactProfileImpl - withNetworkConfiguration(ContactProfilesPropertiesNetworkConfiguration networkConfiguration) { - this.innerModel().withNetworkConfiguration(networkConfiguration); - return this; - } - - public ContactProfileImpl withLinks(List links) { - this.innerModel().withLinks(links); - return this; - } - - public ContactProfileImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateParameters.withTags(tags); - return this; - } - } - - public ContactProfileImpl withProvisioningState(ContactProfilesPropertiesProvisioningState provisioningState) { - this.innerModel().withProvisioningState(provisioningState); - return this; - } - - public ContactProfileImpl withMinimumViableContactDuration(String minimumViableContactDuration) { - this.innerModel().withMinimumViableContactDuration(minimumViableContactDuration); - return this; - } - - public ContactProfileImpl withMinimumElevationDegrees(Float minimumElevationDegrees) { - this.innerModel().withMinimumElevationDegrees(minimumElevationDegrees); - return this; - } - - public ContactProfileImpl withAutoTrackingConfiguration(AutoTrackingConfiguration autoTrackingConfiguration) { - this.innerModel().withAutoTrackingConfiguration(autoTrackingConfiguration); - return this; - } - - public ContactProfileImpl withEventHubUri(String eventHubUri) { - this.innerModel().withEventHubUri(eventHubUri); - return this; - } - - public ContactProfileImpl - withThirdPartyConfigurations(List thirdPartyConfigurations) { - this.innerModel().withThirdPartyConfigurations(thirdPartyConfigurations); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactProfilesClientImpl.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactProfilesClientImpl.java deleted file mode 100644 index f4a31b2f3561..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactProfilesClientImpl.java +++ /dev/null @@ -1,1387 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.orbital.fluent.ContactProfilesClient; -import com.azure.resourcemanager.orbital.fluent.models.ContactProfileInner; -import com.azure.resourcemanager.orbital.models.ContactProfileListResult; -import com.azure.resourcemanager.orbital.models.TagsObject; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ContactProfilesClient. - */ -public final class ContactProfilesClientImpl implements ContactProfilesClient { - /** - * The proxy service used to perform REST calls. - */ - private final ContactProfilesService service; - - /** - * The service client containing this operation class. - */ - private final AzureOrbitalImpl client; - - /** - * Initializes an instance of ContactProfilesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ContactProfilesClientImpl(AzureOrbitalImpl client) { - this.service - = RestProxy.create(ContactProfilesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureOrbitalContactProfiles to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureOrbitalContactP") - public interface ContactProfilesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/contactProfiles/{contactProfileName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @PathParam("contactProfileName") String contactProfileName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/contactProfiles/{contactProfileName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @PathParam("contactProfileName") String contactProfileName, - @BodyParam("application/json") ContactProfileInner parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/contactProfiles/{contactProfileName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @PathParam("contactProfileName") String contactProfileName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/contactProfiles/{contactProfileName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateTags(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @PathParam("contactProfileName") String contactProfileName, - @BodyParam("application/json") TagsObject parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Orbital/contactProfiles") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @QueryParam("$skiptoken") String skiptoken, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/contactProfiles") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @QueryParam("$skiptoken") String skiptoken, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the specified contact Profile in a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified contact Profile in a specified resource group along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String contactProfileName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (contactProfileName == null) { - return Mono - .error(new IllegalArgumentException("Parameter contactProfileName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), contactProfileName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the specified contact Profile in a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified contact Profile in a specified resource group along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String contactProfileName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (contactProfileName == null) { - return Mono - .error(new IllegalArgumentException("Parameter contactProfileName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), contactProfileName, accept, context); - } - - /** - * Gets the specified contact Profile in a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified contact Profile in a specified resource group on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String contactProfileName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, contactProfileName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the specified contact Profile in a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified contact Profile in a specified resource group along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String contactProfileName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, contactProfileName, context).block(); - } - - /** - * Gets the specified contact Profile in a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified contact Profile in a specified resource group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContactProfileInner getByResourceGroup(String resourceGroupName, String contactProfileName) { - return getByResourceGroupWithResponse(resourceGroupName, contactProfileName, Context.NONE).getValue(); - } - - /** - * Creates or updates a contact profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters The parameters to provide for the created Contact Profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a Contact Profile Resource, which will contain all of the configurations required for - * scheduling a contact along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String contactProfileName, ContactProfileInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (contactProfileName == null) { - return Mono - .error(new IllegalArgumentException("Parameter contactProfileName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), contactProfileName, parameters, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a contact profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters The parameters to provide for the created Contact Profile. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a Contact Profile Resource, which will contain all of the configurations required for - * scheduling a contact along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String contactProfileName, ContactProfileInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (contactProfileName == null) { - return Mono - .error(new IllegalArgumentException("Parameter contactProfileName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), contactProfileName, parameters, accept, context); - } - - /** - * Creates or updates a contact profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters The parameters to provide for the created Contact Profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of customer creates a Contact Profile Resource, which will contain all - * of the configurations required for scheduling a contact. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ContactProfileInner> - beginCreateOrUpdateAsync(String resourceGroupName, String contactProfileName, ContactProfileInner parameters) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, contactProfileName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ContactProfileInner.class, ContactProfileInner.class, this.client.getContext()); - } - - /** - * Creates or updates a contact profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters The parameters to provide for the created Contact Profile. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of customer creates a Contact Profile Resource, which will contain all - * of the configurations required for scheduling a contact. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ContactProfileInner> beginCreateOrUpdateAsync( - String resourceGroupName, String contactProfileName, ContactProfileInner parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, contactProfileName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ContactProfileInner.class, ContactProfileInner.class, context); - } - - /** - * Creates or updates a contact profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters The parameters to provide for the created Contact Profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of customer creates a Contact Profile Resource, which will contain all - * of the configurations required for scheduling a contact. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ContactProfileInner> - beginCreateOrUpdate(String resourceGroupName, String contactProfileName, ContactProfileInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, contactProfileName, parameters).getSyncPoller(); - } - - /** - * Creates or updates a contact profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters The parameters to provide for the created Contact Profile. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of customer creates a Contact Profile Resource, which will contain all - * of the configurations required for scheduling a contact. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ContactProfileInner> beginCreateOrUpdate( - String resourceGroupName, String contactProfileName, ContactProfileInner parameters, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, contactProfileName, parameters, context) - .getSyncPoller(); - } - - /** - * Creates or updates a contact profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters The parameters to provide for the created Contact Profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a Contact Profile Resource, which will contain all of the configurations required for - * scheduling a contact on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String contactProfileName, - ContactProfileInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, contactProfileName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a contact profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters The parameters to provide for the created Contact Profile. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a Contact Profile Resource, which will contain all of the configurations required for - * scheduling a contact on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String contactProfileName, - ContactProfileInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, contactProfileName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a contact profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters The parameters to provide for the created Contact Profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a Contact Profile Resource, which will contain all of the configurations required for - * scheduling a contact. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContactProfileInner createOrUpdate(String resourceGroupName, String contactProfileName, - ContactProfileInner parameters) { - return createOrUpdateAsync(resourceGroupName, contactProfileName, parameters).block(); - } - - /** - * Creates or updates a contact profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters The parameters to provide for the created Contact Profile. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a Contact Profile Resource, which will contain all of the configurations required for - * scheduling a contact. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContactProfileInner createOrUpdate(String resourceGroupName, String contactProfileName, - ContactProfileInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, contactProfileName, parameters, context).block(); - } - - /** - * Deletes a specified contact profile resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String contactProfileName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (contactProfileName == null) { - return Mono - .error(new IllegalArgumentException("Parameter contactProfileName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), contactProfileName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a specified contact profile resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String contactProfileName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (contactProfileName == null) { - return Mono - .error(new IllegalArgumentException("Parameter contactProfileName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), contactProfileName, accept, context); - } - - /** - * Deletes a specified contact profile resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String contactProfileName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, contactProfileName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a specified contact profile resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String contactProfileName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, contactProfileName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a specified contact profile resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String contactProfileName) { - return this.beginDeleteAsync(resourceGroupName, contactProfileName).getSyncPoller(); - } - - /** - * Deletes a specified contact profile resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String contactProfileName, - Context context) { - return this.beginDeleteAsync(resourceGroupName, contactProfileName, context).getSyncPoller(); - } - - /** - * Deletes a specified contact profile resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String contactProfileName) { - return beginDeleteAsync(resourceGroupName, contactProfileName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a specified contact profile resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String contactProfileName, Context context) { - return beginDeleteAsync(resourceGroupName, contactProfileName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a specified contact profile resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String contactProfileName) { - deleteAsync(resourceGroupName, contactProfileName).block(); - } - - /** - * Deletes a specified contact profile resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String contactProfileName, Context context) { - deleteAsync(resourceGroupName, contactProfileName, context).block(); - } - - /** - * Updates the specified contact profile tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters Parameters supplied to update contact profile tags. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a Contact Profile Resource, which will contain all of the configurations required for - * scheduling a contact along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateTagsWithResponseAsync(String resourceGroupName, - String contactProfileName, TagsObject parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (contactProfileName == null) { - return Mono - .error(new IllegalArgumentException("Parameter contactProfileName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), contactProfileName, parameters, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates the specified contact profile tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters Parameters supplied to update contact profile tags. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a Contact Profile Resource, which will contain all of the configurations required for - * scheduling a contact along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateTagsWithResponseAsync(String resourceGroupName, - String contactProfileName, TagsObject parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (contactProfileName == null) { - return Mono - .error(new IllegalArgumentException("Parameter contactProfileName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateTags(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), contactProfileName, parameters, accept, context); - } - - /** - * Updates the specified contact profile tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters Parameters supplied to update contact profile tags. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of customer creates a Contact Profile Resource, which will contain all - * of the configurations required for scheduling a contact. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ContactProfileInner> - beginUpdateTagsAsync(String resourceGroupName, String contactProfileName, TagsObject parameters) { - Mono>> mono - = updateTagsWithResponseAsync(resourceGroupName, contactProfileName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ContactProfileInner.class, ContactProfileInner.class, this.client.getContext()); - } - - /** - * Updates the specified contact profile tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters Parameters supplied to update contact profile tags. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of customer creates a Contact Profile Resource, which will contain all - * of the configurations required for scheduling a contact. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ContactProfileInner> beginUpdateTagsAsync( - String resourceGroupName, String contactProfileName, TagsObject parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateTagsWithResponseAsync(resourceGroupName, contactProfileName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ContactProfileInner.class, ContactProfileInner.class, context); - } - - /** - * Updates the specified contact profile tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters Parameters supplied to update contact profile tags. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of customer creates a Contact Profile Resource, which will contain all - * of the configurations required for scheduling a contact. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ContactProfileInner> beginUpdateTags(String resourceGroupName, - String contactProfileName, TagsObject parameters) { - return this.beginUpdateTagsAsync(resourceGroupName, contactProfileName, parameters).getSyncPoller(); - } - - /** - * Updates the specified contact profile tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters Parameters supplied to update contact profile tags. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of customer creates a Contact Profile Resource, which will contain all - * of the configurations required for scheduling a contact. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ContactProfileInner> beginUpdateTags(String resourceGroupName, - String contactProfileName, TagsObject parameters, Context context) { - return this.beginUpdateTagsAsync(resourceGroupName, contactProfileName, parameters, context).getSyncPoller(); - } - - /** - * Updates the specified contact profile tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters Parameters supplied to update contact profile tags. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a Contact Profile Resource, which will contain all of the configurations required for - * scheduling a contact on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateTagsAsync(String resourceGroupName, String contactProfileName, - TagsObject parameters) { - return beginUpdateTagsAsync(resourceGroupName, contactProfileName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates the specified contact profile tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters Parameters supplied to update contact profile tags. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a Contact Profile Resource, which will contain all of the configurations required for - * scheduling a contact on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateTagsAsync(String resourceGroupName, String contactProfileName, - TagsObject parameters, Context context) { - return beginUpdateTagsAsync(resourceGroupName, contactProfileName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates the specified contact profile tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters Parameters supplied to update contact profile tags. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a Contact Profile Resource, which will contain all of the configurations required for - * scheduling a contact. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContactProfileInner updateTags(String resourceGroupName, String contactProfileName, TagsObject parameters) { - return updateTagsAsync(resourceGroupName, contactProfileName, parameters).block(); - } - - /** - * Updates the specified contact profile tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters Parameters supplied to update contact profile tags. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a Contact Profile Resource, which will contain all of the configurations required for - * scheduling a contact. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContactProfileInner updateTags(String resourceGroupName, String contactProfileName, TagsObject parameters, - Context context) { - return updateTagsAsync(resourceGroupName, contactProfileName, parameters, context).block(); - } - - /** - * Returns list of contact profiles by Subscription. - * - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String skiptoken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), skiptoken, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Returns list of contact profiles by Subscription. - * - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String skiptoken, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), skiptoken, - accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Returns list of contact profiles by Subscription. - * - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String skiptoken) { - return new PagedFlux<>(() -> listSinglePageAsync(skiptoken), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * Returns list of contact profiles by Subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final String skiptoken = null; - return new PagedFlux<>(() -> listSinglePageAsync(skiptoken), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * Returns list of contact profiles by Subscription. - * - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String skiptoken, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(skiptoken, context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * Returns list of contact profiles by Subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final String skiptoken = null; - return new PagedIterable<>(listAsync(skiptoken)); - } - - /** - * Returns list of contact profiles by Subscription. - * - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String skiptoken, Context context) { - return new PagedIterable<>(listAsync(skiptoken, context)); - } - - /** - * Returns list of contact profiles by Resource Group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - String skiptoken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), skiptoken, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Returns list of contact profiles by Resource Group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - String skiptoken, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), skiptoken, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Returns list of contact profiles by Resource Group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skiptoken) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skiptoken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Returns list of contact profiles by Resource Group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - final String skiptoken = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skiptoken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Returns list of contact profiles by Resource Group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skiptoken, - Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skiptoken, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Returns list of contact profiles by Resource Group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - final String skiptoken = null; - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skiptoken)); - } - - /** - * Returns list of contact profiles by Resource Group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, String skiptoken, - Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skiptoken, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactProfilesImpl.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactProfilesImpl.java deleted file mode 100644 index 00ec6c555f0c..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactProfilesImpl.java +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.orbital.fluent.ContactProfilesClient; -import com.azure.resourcemanager.orbital.fluent.models.ContactProfileInner; -import com.azure.resourcemanager.orbital.models.ContactProfile; -import com.azure.resourcemanager.orbital.models.ContactProfiles; - -public final class ContactProfilesImpl implements ContactProfiles { - private static final ClientLogger LOGGER = new ClientLogger(ContactProfilesImpl.class); - - private final ContactProfilesClient innerClient; - - private final com.azure.resourcemanager.orbital.OrbitalManager serviceManager; - - public ContactProfilesImpl(ContactProfilesClient innerClient, - com.azure.resourcemanager.orbital.OrbitalManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getByResourceGroupWithResponse(String resourceGroupName, String contactProfileName, - Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, contactProfileName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ContactProfileImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ContactProfile getByResourceGroup(String resourceGroupName, String contactProfileName) { - ContactProfileInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, contactProfileName); - if (inner != null) { - return new ContactProfileImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String contactProfileName) { - this.serviceClient().delete(resourceGroupName, contactProfileName); - } - - public void delete(String resourceGroupName, String contactProfileName, Context context) { - this.serviceClient().delete(resourceGroupName, contactProfileName, context); - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ContactProfileImpl(inner1, this.manager())); - } - - public PagedIterable list(String skiptoken, Context context) { - PagedIterable inner = this.serviceClient().list(skiptoken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ContactProfileImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ContactProfileImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, String skiptoken, - Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, skiptoken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ContactProfileImpl(inner1, this.manager())); - } - - public ContactProfile getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String contactProfileName = ResourceManagerUtils.getValueFromIdByName(id, "contactProfiles"); - if (contactProfileName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'contactProfiles'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, contactProfileName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String contactProfileName = ResourceManagerUtils.getValueFromIdByName(id, "contactProfiles"); - if (contactProfileName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'contactProfiles'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, contactProfileName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String contactProfileName = ResourceManagerUtils.getValueFromIdByName(id, "contactProfiles"); - if (contactProfileName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'contactProfiles'.", id))); - } - this.delete(resourceGroupName, contactProfileName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String contactProfileName = ResourceManagerUtils.getValueFromIdByName(id, "contactProfiles"); - if (contactProfileName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'contactProfiles'.", id))); - } - this.delete(resourceGroupName, contactProfileName, context); - } - - private ContactProfilesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.orbital.OrbitalManager manager() { - return this.serviceManager; - } - - public ContactProfileImpl define(String name) { - return new ContactProfileImpl(name, this.manager()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactsClientImpl.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactsClientImpl.java deleted file mode 100644 index 9e7ba8421ddc..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactsClientImpl.java +++ /dev/null @@ -1,960 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.orbital.fluent.ContactsClient; -import com.azure.resourcemanager.orbital.fluent.models.ContactInner; -import com.azure.resourcemanager.orbital.models.ContactListResult; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ContactsClient. - */ -public final class ContactsClientImpl implements ContactsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ContactsService service; - - /** - * The service client containing this operation class. - */ - private final AzureOrbitalImpl client; - - /** - * Initializes an instance of ContactsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ContactsClientImpl(AzureOrbitalImpl client) { - this.service = RestProxy.create(ContactsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureOrbitalContacts to be used by the proxy service to perform REST - * calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureOrbitalContacts") - public interface ContactsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/spacecrafts/{spacecraftName}/contacts") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @PathParam("spacecraftName") String spacecraftName, @QueryParam("$skiptoken") String skiptoken, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/spacecrafts/{spacecraftName}/contacts/{contactName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @PathParam("spacecraftName") String spacecraftName, @PathParam("contactName") String contactName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/spacecrafts/{spacecraftName}/contacts/{contactName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @PathParam("spacecraftName") String spacecraftName, @PathParam("contactName") String contactName, - @BodyParam("application/json") ContactInner parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/spacecrafts/{spacecraftName}/contacts/{contactName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @PathParam("spacecraftName") String spacecraftName, @PathParam("contactName") String contactName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Returns list of contacts by spacecraftName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContacts API service call along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String spacecraftName, - String skiptoken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (spacecraftName == null) { - return Mono.error(new IllegalArgumentException("Parameter spacecraftName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.list(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), spacecraftName, skiptoken, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Returns list of contacts by spacecraftName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContacts API service call along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String spacecraftName, - String skiptoken, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (spacecraftName == null) { - return Mono.error(new IllegalArgumentException("Parameter spacecraftName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), spacecraftName, skiptoken, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Returns list of contacts by spacecraftName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContacts API service call as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String spacecraftName, String skiptoken) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, spacecraftName, skiptoken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Returns list of contacts by spacecraftName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContacts API service call as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String spacecraftName) { - final String skiptoken = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, spacecraftName, skiptoken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Returns list of contacts by spacecraftName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContacts API service call as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String spacecraftName, String skiptoken, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, spacecraftName, skiptoken, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Returns list of contacts by spacecraftName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContacts API service call as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String spacecraftName) { - final String skiptoken = null; - return new PagedIterable<>(listAsync(resourceGroupName, spacecraftName, skiptoken)); - } - - /** - * Returns list of contacts by spacecraftName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContacts API service call as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String spacecraftName, String skiptoken, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, spacecraftName, skiptoken, context)); - } - - /** - * Gets the specified contact in a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified contact in a specified resource group along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String spacecraftName, - String contactName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (spacecraftName == null) { - return Mono.error(new IllegalArgumentException("Parameter spacecraftName is required and cannot be null.")); - } - if (contactName == null) { - return Mono.error(new IllegalArgumentException("Parameter contactName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), spacecraftName, contactName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the specified contact in a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified contact in a specified resource group along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String spacecraftName, - String contactName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (spacecraftName == null) { - return Mono.error(new IllegalArgumentException("Parameter spacecraftName is required and cannot be null.")); - } - if (contactName == null) { - return Mono.error(new IllegalArgumentException("Parameter contactName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), spacecraftName, contactName, accept, context); - } - - /** - * Gets the specified contact in a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified contact in a specified resource group on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String spacecraftName, String contactName) { - return getWithResponseAsync(resourceGroupName, spacecraftName, contactName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the specified contact in a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified contact in a specified resource group along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String spacecraftName, String contactName, - Context context) { - return getWithResponseAsync(resourceGroupName, spacecraftName, contactName, context).block(); - } - - /** - * Gets the specified contact in a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified contact in a specified resource group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContactInner get(String resourceGroupName, String spacecraftName, String contactName) { - return getWithResponse(resourceGroupName, spacecraftName, contactName, Context.NONE).getValue(); - } - - /** - * Creates a contact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @param parameters The parameters to provide for the created contact. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a contact resource for a spacecraft resource along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String spacecraftName, - String contactName, ContactInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (spacecraftName == null) { - return Mono.error(new IllegalArgumentException("Parameter spacecraftName is required and cannot be null.")); - } - if (contactName == null) { - return Mono.error(new IllegalArgumentException("Parameter contactName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.create(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), spacecraftName, contactName, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates a contact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @param parameters The parameters to provide for the created contact. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a contact resource for a spacecraft resource along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String spacecraftName, - String contactName, ContactInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (spacecraftName == null) { - return Mono.error(new IllegalArgumentException("Parameter spacecraftName is required and cannot be null.")); - } - if (contactName == null) { - return Mono.error(new IllegalArgumentException("Parameter contactName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), spacecraftName, contactName, parameters, accept, context); - } - - /** - * Creates a contact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @param parameters The parameters to provide for the created contact. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of customer creates a contact resource for a spacecraft resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ContactInner> beginCreateAsync(String resourceGroupName, - String spacecraftName, String contactName, ContactInner parameters) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, spacecraftName, contactName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ContactInner.class, ContactInner.class, this.client.getContext()); - } - - /** - * Creates a contact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @param parameters The parameters to provide for the created contact. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of customer creates a contact resource for a spacecraft resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ContactInner> beginCreateAsync(String resourceGroupName, - String spacecraftName, String contactName, ContactInner parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, spacecraftName, contactName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ContactInner.class, ContactInner.class, context); - } - - /** - * Creates a contact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @param parameters The parameters to provide for the created contact. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of customer creates a contact resource for a spacecraft resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ContactInner> beginCreate(String resourceGroupName, - String spacecraftName, String contactName, ContactInner parameters) { - return this.beginCreateAsync(resourceGroupName, spacecraftName, contactName, parameters).getSyncPoller(); - } - - /** - * Creates a contact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @param parameters The parameters to provide for the created contact. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of customer creates a contact resource for a spacecraft resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ContactInner> beginCreate(String resourceGroupName, - String spacecraftName, String contactName, ContactInner parameters, Context context) { - return this.beginCreateAsync(resourceGroupName, spacecraftName, contactName, parameters, context) - .getSyncPoller(); - } - - /** - * Creates a contact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @param parameters The parameters to provide for the created contact. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a contact resource for a spacecraft resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String spacecraftName, String contactName, - ContactInner parameters) { - return beginCreateAsync(resourceGroupName, spacecraftName, contactName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a contact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @param parameters The parameters to provide for the created contact. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a contact resource for a spacecraft resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String spacecraftName, String contactName, - ContactInner parameters, Context context) { - return beginCreateAsync(resourceGroupName, spacecraftName, contactName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a contact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @param parameters The parameters to provide for the created contact. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a contact resource for a spacecraft resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContactInner create(String resourceGroupName, String spacecraftName, String contactName, - ContactInner parameters) { - return createAsync(resourceGroupName, spacecraftName, contactName, parameters).block(); - } - - /** - * Creates a contact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @param parameters The parameters to provide for the created contact. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a contact resource for a spacecraft resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContactInner create(String resourceGroupName, String spacecraftName, String contactName, - ContactInner parameters, Context context) { - return createAsync(resourceGroupName, spacecraftName, contactName, parameters, context).block(); - } - - /** - * Deletes a specified contact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String spacecraftName, - String contactName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (spacecraftName == null) { - return Mono.error(new IllegalArgumentException("Parameter spacecraftName is required and cannot be null.")); - } - if (contactName == null) { - return Mono.error(new IllegalArgumentException("Parameter contactName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), spacecraftName, contactName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a specified contact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String spacecraftName, - String contactName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (spacecraftName == null) { - return Mono.error(new IllegalArgumentException("Parameter spacecraftName is required and cannot be null.")); - } - if (contactName == null) { - return Mono.error(new IllegalArgumentException("Parameter contactName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), spacecraftName, contactName, accept, context); - } - - /** - * Deletes a specified contact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String spacecraftName, - String contactName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, spacecraftName, contactName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a specified contact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String spacecraftName, - String contactName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, spacecraftName, contactName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a specified contact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String spacecraftName, - String contactName) { - return this.beginDeleteAsync(resourceGroupName, spacecraftName, contactName).getSyncPoller(); - } - - /** - * Deletes a specified contact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String spacecraftName, - String contactName, Context context) { - return this.beginDeleteAsync(resourceGroupName, spacecraftName, contactName, context).getSyncPoller(); - } - - /** - * Deletes a specified contact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String spacecraftName, String contactName) { - return beginDeleteAsync(resourceGroupName, spacecraftName, contactName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a specified contact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String spacecraftName, String contactName, - Context context) { - return beginDeleteAsync(resourceGroupName, spacecraftName, contactName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a specified contact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String spacecraftName, String contactName) { - deleteAsync(resourceGroupName, spacecraftName, contactName).block(); - } - - /** - * Deletes a specified contact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String spacecraftName, String contactName, Context context) { - deleteAsync(resourceGroupName, spacecraftName, contactName, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContacts API service call along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContacts API service call along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactsImpl.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactsImpl.java deleted file mode 100644 index afb44dee31c4..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactsImpl.java +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.orbital.fluent.ContactsClient; -import com.azure.resourcemanager.orbital.fluent.models.ContactInner; -import com.azure.resourcemanager.orbital.models.Contact; -import com.azure.resourcemanager.orbital.models.Contacts; - -public final class ContactsImpl implements Contacts { - private static final ClientLogger LOGGER = new ClientLogger(ContactsImpl.class); - - private final ContactsClient innerClient; - - private final com.azure.resourcemanager.orbital.OrbitalManager serviceManager; - - public ContactsImpl(ContactsClient innerClient, com.azure.resourcemanager.orbital.OrbitalManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String spacecraftName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, spacecraftName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ContactImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String spacecraftName, String skiptoken, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, spacecraftName, skiptoken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ContactImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String spacecraftName, String contactName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, spacecraftName, contactName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ContactImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Contact get(String resourceGroupName, String spacecraftName, String contactName) { - ContactInner inner = this.serviceClient().get(resourceGroupName, spacecraftName, contactName); - if (inner != null) { - return new ContactImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String spacecraftName, String contactName) { - this.serviceClient().delete(resourceGroupName, spacecraftName, contactName); - } - - public void delete(String resourceGroupName, String spacecraftName, String contactName, Context context) { - this.serviceClient().delete(resourceGroupName, spacecraftName, contactName, context); - } - - public Contact getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String spacecraftName = ResourceManagerUtils.getValueFromIdByName(id, "spacecrafts"); - if (spacecraftName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'spacecrafts'.", id))); - } - String contactName = ResourceManagerUtils.getValueFromIdByName(id, "contacts"); - if (contactName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'contacts'.", id))); - } - return this.getWithResponse(resourceGroupName, spacecraftName, contactName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String spacecraftName = ResourceManagerUtils.getValueFromIdByName(id, "spacecrafts"); - if (spacecraftName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'spacecrafts'.", id))); - } - String contactName = ResourceManagerUtils.getValueFromIdByName(id, "contacts"); - if (contactName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'contacts'.", id))); - } - return this.getWithResponse(resourceGroupName, spacecraftName, contactName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String spacecraftName = ResourceManagerUtils.getValueFromIdByName(id, "spacecrafts"); - if (spacecraftName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'spacecrafts'.", id))); - } - String contactName = ResourceManagerUtils.getValueFromIdByName(id, "contacts"); - if (contactName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'contacts'.", id))); - } - this.delete(resourceGroupName, spacecraftName, contactName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String spacecraftName = ResourceManagerUtils.getValueFromIdByName(id, "spacecrafts"); - if (spacecraftName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'spacecrafts'.", id))); - } - String contactName = ResourceManagerUtils.getValueFromIdByName(id, "contacts"); - if (contactName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'contacts'.", id))); - } - this.delete(resourceGroupName, spacecraftName, contactName, context); - } - - private ContactsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.orbital.OrbitalManager manager() { - return this.serviceManager; - } - - public ContactImpl define(String name) { - return new ContactImpl(name, this.manager()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/OperationImpl.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/OperationImpl.java deleted file mode 100644 index 3103f0afb990..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/OperationImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.implementation; - -import com.azure.resourcemanager.orbital.fluent.models.OperationInner; -import com.azure.resourcemanager.orbital.models.ActionType; -import com.azure.resourcemanager.orbital.models.Operation; -import com.azure.resourcemanager.orbital.models.OperationDisplay; -import com.azure.resourcemanager.orbital.models.Origin; - -public final class OperationImpl implements Operation { - private OperationInner innerObject; - - private final com.azure.resourcemanager.orbital.OrbitalManager serviceManager; - - OperationImpl(OperationInner innerObject, com.azure.resourcemanager.orbital.OrbitalManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public Boolean isDataAction() { - return this.innerModel().isDataAction(); - } - - public OperationDisplay display() { - return this.innerModel().display(); - } - - public Origin origin() { - return this.innerModel().origin(); - } - - public ActionType actionType() { - return this.innerModel().actionType(); - } - - public OperationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.orbital.OrbitalManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/OperationResultImpl.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/OperationResultImpl.java deleted file mode 100644 index 001d53ef1158..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/OperationResultImpl.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.implementation; - -import com.azure.resourcemanager.orbital.fluent.models.OperationResultInner; -import com.azure.resourcemanager.orbital.models.OperationResult; -import com.azure.resourcemanager.orbital.models.OperationResultErrorProperties; -import com.azure.resourcemanager.orbital.models.Status; -import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.List; - -public final class OperationResultImpl implements OperationResult { - private OperationResultInner innerObject; - - private final com.azure.resourcemanager.orbital.OrbitalManager serviceManager; - - OperationResultImpl(OperationResultInner innerObject, - com.azure.resourcemanager.orbital.OrbitalManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public Status status() { - return this.innerModel().status(); - } - - public OffsetDateTime startTime() { - return this.innerModel().startTime(); - } - - public OffsetDateTime endTime() { - return this.innerModel().endTime(); - } - - public Double percentComplete() { - return this.innerModel().percentComplete(); - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String nextLink() { - return this.innerModel().nextLink(); - } - - public Object properties() { - return this.innerModel().properties(); - } - - public OperationResultErrorProperties error() { - return this.innerModel().error(); - } - - public OperationResultInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.orbital.OrbitalManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/OperationsClientImpl.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/OperationsClientImpl.java deleted file mode 100644 index 35aba2775a7b..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/OperationsClientImpl.java +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.orbital.fluent.OperationsClient; -import com.azure.resourcemanager.orbital.fluent.models.OperationInner; -import com.azure.resourcemanager.orbital.models.OperationListResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in OperationsClient. - */ -public final class OperationsClientImpl implements OperationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final OperationsService service; - - /** - * The service client containing this operation class. - */ - private final AzureOrbitalImpl client; - - /** - * Initializes an instance of OperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OperationsClientImpl(AzureOrbitalImpl client) { - this.service - = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureOrbitalOperations to be used by the proxy service to perform - * REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureOrbitalOperatio") - public interface OperationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/providers/Microsoft.Orbital/operations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Lists all of the available Orbital Rest API operations. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), null, null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all of the available Orbital Rest API operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), null, null)); - } - - /** - * Lists all of the available Orbital Rest API operations. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync()); - } - - /** - * Lists all of the available Orbital Rest API operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context)); - } - - /** - * Lists all of the available Orbital Rest API operations. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Lists all of the available Orbital Rest API operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/OperationsImpl.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/OperationsImpl.java deleted file mode 100644 index a8142d7b544c..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/OperationsImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.orbital.fluent.OperationsClient; -import com.azure.resourcemanager.orbital.fluent.models.OperationInner; -import com.azure.resourcemanager.orbital.models.Operation; -import com.azure.resourcemanager.orbital.models.Operations; - -public final class OperationsImpl implements Operations { - private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); - - private final OperationsClient innerClient; - - private final com.azure.resourcemanager.orbital.OrbitalManager serviceManager; - - public OperationsImpl(OperationsClient innerClient, - com.azure.resourcemanager.orbital.OrbitalManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); - } - - private OperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.orbital.OrbitalManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/OperationsResultsClientImpl.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/OperationsResultsClientImpl.java deleted file mode 100644 index 2521def2d868..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/OperationsResultsClientImpl.java +++ /dev/null @@ -1,274 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.orbital.fluent.OperationsResultsClient; -import com.azure.resourcemanager.orbital.fluent.models.OperationResultInner; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in OperationsResultsClient. - */ -public final class OperationsResultsClientImpl implements OperationsResultsClient { - /** - * The proxy service used to perform REST calls. - */ - private final OperationsResultsService service; - - /** - * The service client containing this operation class. - */ - private final AzureOrbitalImpl client; - - /** - * Initializes an instance of OperationsResultsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OperationsResultsClientImpl(AzureOrbitalImpl client) { - this.service - = RestProxy.create(OperationsResultsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureOrbitalOperationsResults to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureOrbitalOperatio") - public interface OperationsResultsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Orbital/locations/{location}/operationResults/{operationId}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @PathParam("location") String location, @PathParam("operationId") String operationId, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Returns operation results. - * - * @param location The name of Azure region. - * @param operationId The ID of an ongoing async operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation Result Entity along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> getWithResponseAsync(String location, String operationId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), location, operationId, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Returns operation results. - * - * @param location The name of Azure region. - * @param operationId The ID of an ongoing async operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation Result Entity along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> getWithResponseAsync(String location, String operationId, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), - location, operationId, accept, context); - } - - /** - * Returns operation results. - * - * @param location The name of Azure region. - * @param operationId The ID of an ongoing async operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of operation Result Entity. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationResultInner> beginGetAsync(String location, - String operationId) { - Mono>> mono = getWithResponseAsync(location, operationId); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - OperationResultInner.class, OperationResultInner.class, this.client.getContext()); - } - - /** - * Returns operation results. - * - * @param location The name of Azure region. - * @param operationId The ID of an ongoing async operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of operation Result Entity. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationResultInner> beginGetAsync(String location, - String operationId, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = getWithResponseAsync(location, operationId, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - OperationResultInner.class, OperationResultInner.class, context); - } - - /** - * Returns operation results. - * - * @param location The name of Azure region. - * @param operationId The ID of an ongoing async operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of operation Result Entity. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationResultInner> beginGet(String location, - String operationId) { - return this.beginGetAsync(location, operationId).getSyncPoller(); - } - - /** - * Returns operation results. - * - * @param location The name of Azure region. - * @param operationId The ID of an ongoing async operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of operation Result Entity. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationResultInner> beginGet(String location, - String operationId, Context context) { - return this.beginGetAsync(location, operationId, context).getSyncPoller(); - } - - /** - * Returns operation results. - * - * @param location The name of Azure region. - * @param operationId The ID of an ongoing async operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation Result Entity on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String location, String operationId) { - return beginGetAsync(location, operationId).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Returns operation results. - * - * @param location The name of Azure region. - * @param operationId The ID of an ongoing async operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation Result Entity on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String location, String operationId, Context context) { - return beginGetAsync(location, operationId, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Returns operation results. - * - * @param location The name of Azure region. - * @param operationId The ID of an ongoing async operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation Result Entity. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OperationResultInner get(String location, String operationId) { - return getAsync(location, operationId).block(); - } - - /** - * Returns operation results. - * - * @param location The name of Azure region. - * @param operationId The ID of an ongoing async operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation Result Entity. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OperationResultInner get(String location, String operationId, Context context) { - return getAsync(location, operationId, context).block(); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/OperationsResultsImpl.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/OperationsResultsImpl.java deleted file mode 100644 index 30f5c1a0b2de..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/OperationsResultsImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.implementation; - -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.orbital.fluent.OperationsResultsClient; -import com.azure.resourcemanager.orbital.fluent.models.OperationResultInner; -import com.azure.resourcemanager.orbital.models.OperationResult; -import com.azure.resourcemanager.orbital.models.OperationsResults; - -public final class OperationsResultsImpl implements OperationsResults { - private static final ClientLogger LOGGER = new ClientLogger(OperationsResultsImpl.class); - - private final OperationsResultsClient innerClient; - - private final com.azure.resourcemanager.orbital.OrbitalManager serviceManager; - - public OperationsResultsImpl(OperationsResultsClient innerClient, - com.azure.resourcemanager.orbital.OrbitalManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public OperationResult get(String location, String operationId) { - OperationResultInner inner = this.serviceClient().get(location, operationId); - if (inner != null) { - return new OperationResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public OperationResult get(String location, String operationId, Context context) { - OperationResultInner inner = this.serviceClient().get(location, operationId, context); - if (inner != null) { - return new OperationResultImpl(inner, this.manager()); - } else { - return null; - } - } - - private OperationsResultsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.orbital.OrbitalManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ResourceManagerUtils.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ResourceManagerUtils.java deleted file mode 100644 index c5d3e1beb5a0..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ResourceManagerUtils.java +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.implementation; - -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.util.CoreUtils; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.function.Function; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import reactor.core.publisher.Flux; - -final class ResourceManagerUtils { - private ResourceManagerUtils() { - } - - static String getValueFromIdByName(String id, String name) { - if (id == null) { - return null; - } - Iterator itr = Arrays.stream(id.split("/")).iterator(); - while (itr.hasNext()) { - String part = itr.next(); - if (part != null && !part.trim().isEmpty()) { - if (part.equalsIgnoreCase(name)) { - if (itr.hasNext()) { - return itr.next(); - } else { - return null; - } - } - } - } - return null; - } - - static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { - if (id == null || pathTemplate == null) { - return null; - } - String parameterNameParentheses = "{" + parameterName + "}"; - List idSegmentsReverted = Arrays.asList(id.split("/")); - List pathSegments = Arrays.asList(pathTemplate.split("/")); - Collections.reverse(idSegmentsReverted); - Iterator idItrReverted = idSegmentsReverted.iterator(); - int pathIndex = pathSegments.size(); - while (idItrReverted.hasNext() && pathIndex > 0) { - String idSegment = idItrReverted.next(); - String pathSegment = pathSegments.get(--pathIndex); - if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) { - if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) { - if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) { - List segments = new ArrayList<>(); - segments.add(idSegment); - idItrReverted.forEachRemaining(segments::add); - Collections.reverse(segments); - if (!segments.isEmpty() && segments.get(0).isEmpty()) { - segments.remove(0); - } - return String.join("/", segments); - } else { - return idSegment; - } - } - } - } - return null; - } - - static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { - return new PagedIterableImpl<>(pageIterable, mapper); - } - - private static final class PagedIterableImpl extends PagedIterable { - - private final PagedIterable pagedIterable; - private final Function mapper; - private final Function, PagedResponse> pageMapper; - - private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux - .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); - this.pagedIterable = pagedIterable; - this.mapper = mapper; - this.pageMapper = getPageMapper(mapper); - } - - private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), - null); - } - - @Override - public Stream stream() { - return pagedIterable.stream().map(mapper); - } - - @Override - public Stream> streamByPage() { - return pagedIterable.streamByPage().map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken) { - return pagedIterable.streamByPage(continuationToken).map(pageMapper); - } - - @Override - public Stream> streamByPage(int preferredPageSize) { - return pagedIterable.streamByPage(preferredPageSize).map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken, int preferredPageSize) { - return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper); - } - - @Override - public Iterator iterator() { - return new IteratorImpl<>(pagedIterable.iterator(), mapper); - } - - @Override - public Iterable> iterableByPage() { - return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); - } - - @Override - public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); - } - } - - private static final class IteratorImpl implements Iterator { - - private final Iterator iterator; - private final Function mapper; - - private IteratorImpl(Iterator iterator, Function mapper) { - this.iterator = iterator; - this.mapper = mapper; - } - - @Override - public boolean hasNext() { - return iterator.hasNext(); - } - - @Override - public S next() { - return mapper.apply(iterator.next()); - } - - @Override - public void remove() { - iterator.remove(); - } - } - - private static final class IterableImpl implements Iterable { - - private final Iterable iterable; - private final Function mapper; - - private IterableImpl(Iterable iterable, Function mapper) { - this.iterable = iterable; - this.mapper = mapper; - } - - @Override - public Iterator iterator() { - return new IteratorImpl<>(iterable.iterator(), mapper); - } - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/SpacecraftImpl.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/SpacecraftImpl.java deleted file mode 100644 index 4ff12b8b8fcb..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/SpacecraftImpl.java +++ /dev/null @@ -1,240 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.orbital.fluent.models.SpacecraftInner; -import com.azure.resourcemanager.orbital.models.AvailableContacts; -import com.azure.resourcemanager.orbital.models.ContactParameters; -import com.azure.resourcemanager.orbital.models.Spacecraft; -import com.azure.resourcemanager.orbital.models.SpacecraftLink; -import com.azure.resourcemanager.orbital.models.SpacecraftsPropertiesProvisioningState; -import com.azure.resourcemanager.orbital.models.TagsObject; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public final class SpacecraftImpl implements Spacecraft, Spacecraft.Definition, Spacecraft.Update { - private SpacecraftInner innerObject; - - private final com.azure.resourcemanager.orbital.OrbitalManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String location() { - return this.innerModel().location(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public SpacecraftsPropertiesProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public String noradId() { - return this.innerModel().noradId(); - } - - public String titleLine() { - return this.innerModel().titleLine(); - } - - public String tleLine1() { - return this.innerModel().tleLine1(); - } - - public String tleLine2() { - return this.innerModel().tleLine2(); - } - - public List links() { - List inner = this.innerModel().links(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public SpacecraftInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.orbital.OrbitalManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String spacecraftName; - - private TagsObject updateParameters; - - public SpacecraftImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public Spacecraft create() { - this.innerObject = serviceManager.serviceClient() - .getSpacecrafts() - .createOrUpdate(resourceGroupName, spacecraftName, this.innerModel(), Context.NONE); - return this; - } - - public Spacecraft create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getSpacecrafts() - .createOrUpdate(resourceGroupName, spacecraftName, this.innerModel(), context); - return this; - } - - SpacecraftImpl(String name, com.azure.resourcemanager.orbital.OrbitalManager serviceManager) { - this.innerObject = new SpacecraftInner(); - this.serviceManager = serviceManager; - this.spacecraftName = name; - } - - public SpacecraftImpl update() { - this.updateParameters = new TagsObject(); - return this; - } - - public Spacecraft apply() { - this.innerObject = serviceManager.serviceClient() - .getSpacecrafts() - .updateTags(resourceGroupName, spacecraftName, updateParameters, Context.NONE); - return this; - } - - public Spacecraft apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getSpacecrafts() - .updateTags(resourceGroupName, spacecraftName, updateParameters, context); - return this; - } - - SpacecraftImpl(SpacecraftInner innerObject, com.azure.resourcemanager.orbital.OrbitalManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.spacecraftName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "spacecrafts"); - } - - public Spacecraft refresh() { - this.innerObject = serviceManager.serviceClient() - .getSpacecrafts() - .getByResourceGroupWithResponse(resourceGroupName, spacecraftName, Context.NONE) - .getValue(); - return this; - } - - public Spacecraft refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getSpacecrafts() - .getByResourceGroupWithResponse(resourceGroupName, spacecraftName, context) - .getValue(); - return this; - } - - public PagedIterable listAvailableContacts(ContactParameters parameters) { - return serviceManager.spacecrafts().listAvailableContacts(resourceGroupName, spacecraftName, parameters); - } - - public PagedIterable listAvailableContacts(ContactParameters parameters, Context context) { - return serviceManager.spacecrafts() - .listAvailableContacts(resourceGroupName, spacecraftName, parameters, context); - } - - public SpacecraftImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public SpacecraftImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public SpacecraftImpl withTitleLine(String titleLine) { - this.innerModel().withTitleLine(titleLine); - return this; - } - - public SpacecraftImpl withTleLine1(String tleLine1) { - this.innerModel().withTleLine1(tleLine1); - return this; - } - - public SpacecraftImpl withTleLine2(String tleLine2) { - this.innerModel().withTleLine2(tleLine2); - return this; - } - - public SpacecraftImpl withLinks(List links) { - this.innerModel().withLinks(links); - return this; - } - - public SpacecraftImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateParameters.withTags(tags); - return this; - } - } - - public SpacecraftImpl withProvisioningState(SpacecraftsPropertiesProvisioningState provisioningState) { - this.innerModel().withProvisioningState(provisioningState); - return this; - } - - public SpacecraftImpl withNoradId(String noradId) { - this.innerModel().withNoradId(noradId); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/SpacecraftsClientImpl.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/SpacecraftsClientImpl.java deleted file mode 100644 index 614a526df4ca..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/SpacecraftsClientImpl.java +++ /dev/null @@ -1,1621 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.orbital.fluent.SpacecraftsClient; -import com.azure.resourcemanager.orbital.fluent.models.AvailableContactsInner; -import com.azure.resourcemanager.orbital.fluent.models.SpacecraftInner; -import com.azure.resourcemanager.orbital.models.AvailableContactsListResult; -import com.azure.resourcemanager.orbital.models.ContactParameters; -import com.azure.resourcemanager.orbital.models.SpacecraftListResult; -import com.azure.resourcemanager.orbital.models.TagsObject; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in SpacecraftsClient. - */ -public final class SpacecraftsClientImpl implements SpacecraftsClient { - /** - * The proxy service used to perform REST calls. - */ - private final SpacecraftsService service; - - /** - * The service client containing this operation class. - */ - private final AzureOrbitalImpl client; - - /** - * Initializes an instance of SpacecraftsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - SpacecraftsClientImpl(AzureOrbitalImpl client) { - this.service - = RestProxy.create(SpacecraftsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureOrbitalSpacecrafts to be used by the proxy service to perform - * REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureOrbitalSpacecra") - public interface SpacecraftsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Orbital/spacecrafts") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @QueryParam("$skiptoken") String skiptoken, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/spacecrafts") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @QueryParam("$skiptoken") String skiptoken, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/spacecrafts/{spacecraftName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @PathParam("spacecraftName") String spacecraftName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/spacecrafts/{spacecraftName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @PathParam("spacecraftName") String spacecraftName, - @BodyParam("application/json") SpacecraftInner parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/spacecrafts/{spacecraftName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @PathParam("spacecraftName") String spacecraftName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/spacecrafts/{spacecraftName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateTags(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @PathParam("spacecraftName") String spacecraftName, @BodyParam("application/json") TagsObject parameters, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/spacecrafts/{spacecraftName}/listAvailableContacts") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> listAvailableContacts(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @PathParam("spacecraftName") String spacecraftName, - @BodyParam("application/json") ContactParameters parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listAvailableContactsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Returns list of spacecrafts by subscription. - * - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String skiptoken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), skiptoken, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Returns list of spacecrafts by subscription. - * - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String skiptoken, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), skiptoken, - accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Returns list of spacecrafts by subscription. - * - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String skiptoken) { - return new PagedFlux<>(() -> listSinglePageAsync(skiptoken), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * Returns list of spacecrafts by subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final String skiptoken = null; - return new PagedFlux<>(() -> listSinglePageAsync(skiptoken), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * Returns list of spacecrafts by subscription. - * - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String skiptoken, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(skiptoken, context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * Returns list of spacecrafts by subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final String skiptoken = null; - return new PagedIterable<>(listAsync(skiptoken)); - } - - /** - * Returns list of spacecrafts by subscription. - * - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String skiptoken, Context context) { - return new PagedIterable<>(listAsync(skiptoken, context)); - } - - /** - * Returns list of spacecrafts by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - String skiptoken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), skiptoken, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Returns list of spacecrafts by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - String skiptoken, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), skiptoken, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Returns list of spacecrafts by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skiptoken) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skiptoken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Returns list of spacecrafts by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - final String skiptoken = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skiptoken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Returns list of spacecrafts by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skiptoken, - Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skiptoken, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Returns list of spacecrafts by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - final String skiptoken = null; - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skiptoken)); - } - - /** - * Returns list of spacecrafts by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, String skiptoken, - Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skiptoken, context)); - } - - /** - * Gets the specified spacecraft in a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified spacecraft in a specified resource group along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String spacecraftName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (spacecraftName == null) { - return Mono.error(new IllegalArgumentException("Parameter spacecraftName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), spacecraftName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the specified spacecraft in a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified spacecraft in a specified resource group along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String spacecraftName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (spacecraftName == null) { - return Mono.error(new IllegalArgumentException("Parameter spacecraftName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), spacecraftName, accept, context); - } - - /** - * Gets the specified spacecraft in a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified spacecraft in a specified resource group on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String spacecraftName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, spacecraftName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the specified spacecraft in a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified spacecraft in a specified resource group along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String spacecraftName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, spacecraftName, context).block(); - } - - /** - * Gets the specified spacecraft in a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified spacecraft in a specified resource group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SpacecraftInner getByResourceGroup(String resourceGroupName, String spacecraftName) { - return getByResourceGroupWithResponse(resourceGroupName, spacecraftName, Context.NONE).getValue(); - } - - /** - * Creates or updates a spacecraft resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters The parameters to provide for the created spacecraft. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a spacecraft resource to schedule a contact along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String spacecraftName, SpacecraftInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (spacecraftName == null) { - return Mono.error(new IllegalArgumentException("Parameter spacecraftName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), spacecraftName, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a spacecraft resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters The parameters to provide for the created spacecraft. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a spacecraft resource to schedule a contact along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String spacecraftName, SpacecraftInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (spacecraftName == null) { - return Mono.error(new IllegalArgumentException("Parameter spacecraftName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), spacecraftName, parameters, accept, context); - } - - /** - * Creates or updates a spacecraft resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters The parameters to provide for the created spacecraft. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of customer creates a spacecraft resource to schedule a contact. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SpacecraftInner> beginCreateOrUpdateAsync(String resourceGroupName, - String spacecraftName, SpacecraftInner parameters) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, spacecraftName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - SpacecraftInner.class, SpacecraftInner.class, this.client.getContext()); - } - - /** - * Creates or updates a spacecraft resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters The parameters to provide for the created spacecraft. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of customer creates a spacecraft resource to schedule a contact. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SpacecraftInner> beginCreateOrUpdateAsync(String resourceGroupName, - String spacecraftName, SpacecraftInner parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, spacecraftName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - SpacecraftInner.class, SpacecraftInner.class, context); - } - - /** - * Creates or updates a spacecraft resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters The parameters to provide for the created spacecraft. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of customer creates a spacecraft resource to schedule a contact. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SpacecraftInner> beginCreateOrUpdate(String resourceGroupName, - String spacecraftName, SpacecraftInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, spacecraftName, parameters).getSyncPoller(); - } - - /** - * Creates or updates a spacecraft resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters The parameters to provide for the created spacecraft. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of customer creates a spacecraft resource to schedule a contact. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SpacecraftInner> beginCreateOrUpdate(String resourceGroupName, - String spacecraftName, SpacecraftInner parameters, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, spacecraftName, parameters, context).getSyncPoller(); - } - - /** - * Creates or updates a spacecraft resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters The parameters to provide for the created spacecraft. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a spacecraft resource to schedule a contact on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String spacecraftName, - SpacecraftInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, spacecraftName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a spacecraft resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters The parameters to provide for the created spacecraft. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a spacecraft resource to schedule a contact on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String spacecraftName, - SpacecraftInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, spacecraftName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a spacecraft resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters The parameters to provide for the created spacecraft. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a spacecraft resource to schedule a contact. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SpacecraftInner createOrUpdate(String resourceGroupName, String spacecraftName, SpacecraftInner parameters) { - return createOrUpdateAsync(resourceGroupName, spacecraftName, parameters).block(); - } - - /** - * Creates or updates a spacecraft resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters The parameters to provide for the created spacecraft. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a spacecraft resource to schedule a contact. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SpacecraftInner createOrUpdate(String resourceGroupName, String spacecraftName, SpacecraftInner parameters, - Context context) { - return createOrUpdateAsync(resourceGroupName, spacecraftName, parameters, context).block(); - } - - /** - * Deletes a specified spacecraft resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String spacecraftName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (spacecraftName == null) { - return Mono.error(new IllegalArgumentException("Parameter spacecraftName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), spacecraftName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a specified spacecraft resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String spacecraftName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (spacecraftName == null) { - return Mono.error(new IllegalArgumentException("Parameter spacecraftName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), spacecraftName, accept, context); - } - - /** - * Deletes a specified spacecraft resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String spacecraftName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, spacecraftName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a specified spacecraft resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String spacecraftName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, spacecraftName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a specified spacecraft resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String spacecraftName) { - return this.beginDeleteAsync(resourceGroupName, spacecraftName).getSyncPoller(); - } - - /** - * Deletes a specified spacecraft resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String spacecraftName, - Context context) { - return this.beginDeleteAsync(resourceGroupName, spacecraftName, context).getSyncPoller(); - } - - /** - * Deletes a specified spacecraft resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String spacecraftName) { - return beginDeleteAsync(resourceGroupName, spacecraftName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a specified spacecraft resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String spacecraftName, Context context) { - return beginDeleteAsync(resourceGroupName, spacecraftName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a specified spacecraft resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String spacecraftName) { - deleteAsync(resourceGroupName, spacecraftName).block(); - } - - /** - * Deletes a specified spacecraft resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String spacecraftName, Context context) { - deleteAsync(resourceGroupName, spacecraftName, context).block(); - } - - /** - * Updates the specified spacecraft tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters Parameters supplied to update spacecraft tags. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a spacecraft resource to schedule a contact along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateTagsWithResponseAsync(String resourceGroupName, - String spacecraftName, TagsObject parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (spacecraftName == null) { - return Mono.error(new IllegalArgumentException("Parameter spacecraftName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), spacecraftName, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates the specified spacecraft tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters Parameters supplied to update spacecraft tags. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a spacecraft resource to schedule a contact along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateTagsWithResponseAsync(String resourceGroupName, - String spacecraftName, TagsObject parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (spacecraftName == null) { - return Mono.error(new IllegalArgumentException("Parameter spacecraftName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateTags(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), spacecraftName, parameters, accept, context); - } - - /** - * Updates the specified spacecraft tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters Parameters supplied to update spacecraft tags. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of customer creates a spacecraft resource to schedule a contact. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SpacecraftInner> beginUpdateTagsAsync(String resourceGroupName, - String spacecraftName, TagsObject parameters) { - Mono>> mono - = updateTagsWithResponseAsync(resourceGroupName, spacecraftName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - SpacecraftInner.class, SpacecraftInner.class, this.client.getContext()); - } - - /** - * Updates the specified spacecraft tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters Parameters supplied to update spacecraft tags. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of customer creates a spacecraft resource to schedule a contact. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SpacecraftInner> beginUpdateTagsAsync(String resourceGroupName, - String spacecraftName, TagsObject parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateTagsWithResponseAsync(resourceGroupName, spacecraftName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - SpacecraftInner.class, SpacecraftInner.class, context); - } - - /** - * Updates the specified spacecraft tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters Parameters supplied to update spacecraft tags. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of customer creates a spacecraft resource to schedule a contact. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SpacecraftInner> beginUpdateTags(String resourceGroupName, - String spacecraftName, TagsObject parameters) { - return this.beginUpdateTagsAsync(resourceGroupName, spacecraftName, parameters).getSyncPoller(); - } - - /** - * Updates the specified spacecraft tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters Parameters supplied to update spacecraft tags. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of customer creates a spacecraft resource to schedule a contact. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SpacecraftInner> beginUpdateTags(String resourceGroupName, - String spacecraftName, TagsObject parameters, Context context) { - return this.beginUpdateTagsAsync(resourceGroupName, spacecraftName, parameters, context).getSyncPoller(); - } - - /** - * Updates the specified spacecraft tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters Parameters supplied to update spacecraft tags. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a spacecraft resource to schedule a contact on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateTagsAsync(String resourceGroupName, String spacecraftName, - TagsObject parameters) { - return beginUpdateTagsAsync(resourceGroupName, spacecraftName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates the specified spacecraft tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters Parameters supplied to update spacecraft tags. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a spacecraft resource to schedule a contact on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateTagsAsync(String resourceGroupName, String spacecraftName, - TagsObject parameters, Context context) { - return beginUpdateTagsAsync(resourceGroupName, spacecraftName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates the specified spacecraft tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters Parameters supplied to update spacecraft tags. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a spacecraft resource to schedule a contact. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SpacecraftInner updateTags(String resourceGroupName, String spacecraftName, TagsObject parameters) { - return updateTagsAsync(resourceGroupName, spacecraftName, parameters).block(); - } - - /** - * Updates the specified spacecraft tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters Parameters supplied to update spacecraft tags. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a spacecraft resource to schedule a contact. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SpacecraftInner updateTags(String resourceGroupName, String spacecraftName, TagsObject parameters, - Context context) { - return updateTagsAsync(resourceGroupName, spacecraftName, parameters, context).block(); - } - - /** - * Returns list of available contacts. A contact is available if the spacecraft is visible from the ground station - * for more than the minimum viable contact duration provided in the contact profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters The parameters to provide for the contacts. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListAvailableContacts API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAvailableContactsSinglePageAsync(String resourceGroupName, - String spacecraftName, ContactParameters parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (spacecraftName == null) { - return Mono.error(new IllegalArgumentException("Parameter spacecraftName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> { - Mono>> mono = service - .listAvailableContacts(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), spacecraftName, parameters, accept, context) - .cache(); - return Mono.zip(mono, - this.client - .getLroResult(mono, - this.client.getHttpPipeline(), AvailableContactsListResult.class, - AvailableContactsListResult.class, this.client.getContext()) - .last() - .flatMap(this.client::getLroFinalResultOrError)); - }) - .>map( - res -> new PagedResponseBase<>(res.getT1().getRequest(), res.getT1().getStatusCode(), - res.getT1().getHeaders(), res.getT2().value(), res.getT2().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Returns list of available contacts. A contact is available if the spacecraft is visible from the ground station - * for more than the minimum viable contact duration provided in the contact profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters The parameters to provide for the contacts. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListAvailableContacts API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAvailableContactsSinglePageAsync(String resourceGroupName, - String spacecraftName, ContactParameters parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (spacecraftName == null) { - return Mono.error(new IllegalArgumentException("Parameter spacecraftName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - Mono>> mono - = service - .listAvailableContacts(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), spacecraftName, parameters, accept, context) - .cache(); - return Mono - .zip(mono, - this.client - .getLroResult(mono, - this.client.getHttpPipeline(), AvailableContactsListResult.class, - AvailableContactsListResult.class, context) - .last() - .flatMap(this.client::getLroFinalResultOrError)) - .map(res -> new PagedResponseBase<>(res.getT1().getRequest(), res.getT1().getStatusCode(), - res.getT1().getHeaders(), res.getT2().value(), res.getT2().nextLink(), null)); - } - - /** - * Returns list of available contacts. A contact is available if the spacecraft is visible from the ground station - * for more than the minimum viable contact duration provided in the contact profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters The parameters to provide for the contacts. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListAvailableContacts API service call as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAvailableContactsAsync(String resourceGroupName, - String spacecraftName, ContactParameters parameters) { - return new PagedFlux<>( - () -> listAvailableContactsSinglePageAsync(resourceGroupName, spacecraftName, parameters), - nextLink -> listAvailableContactsNextSinglePageAsync(nextLink)); - } - - /** - * Returns list of available contacts. A contact is available if the spacecraft is visible from the ground station - * for more than the minimum viable contact duration provided in the contact profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters The parameters to provide for the contacts. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListAvailableContacts API service call as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAvailableContactsAsync(String resourceGroupName, - String spacecraftName, ContactParameters parameters, Context context) { - return new PagedFlux<>( - () -> listAvailableContactsSinglePageAsync(resourceGroupName, spacecraftName, parameters, context), - nextLink -> listAvailableContactsNextSinglePageAsync(nextLink, context)); - } - - /** - * Returns list of available contacts. A contact is available if the spacecraft is visible from the ground station - * for more than the minimum viable contact duration provided in the contact profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters The parameters to provide for the contacts. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListAvailableContacts API service call as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listAvailableContacts(String resourceGroupName, String spacecraftName, - ContactParameters parameters) { - return new PagedIterable<>(listAvailableContactsAsync(resourceGroupName, spacecraftName, parameters)); - } - - /** - * Returns list of available contacts. A contact is available if the spacecraft is visible from the ground station - * for more than the minimum viable contact duration provided in the contact profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters The parameters to provide for the contacts. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListAvailableContacts API service call as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listAvailableContacts(String resourceGroupName, String spacecraftName, - ContactParameters parameters, Context context) { - return new PagedIterable<>(listAvailableContactsAsync(resourceGroupName, spacecraftName, parameters, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListAvailableContacts API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAvailableContactsNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listAvailableContactsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListAvailableContacts API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAvailableContactsNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listAvailableContactsNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/SpacecraftsImpl.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/SpacecraftsImpl.java deleted file mode 100644 index 3d5f75128823..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/SpacecraftsImpl.java +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.orbital.fluent.SpacecraftsClient; -import com.azure.resourcemanager.orbital.fluent.models.AvailableContactsInner; -import com.azure.resourcemanager.orbital.fluent.models.SpacecraftInner; -import com.azure.resourcemanager.orbital.models.AvailableContacts; -import com.azure.resourcemanager.orbital.models.ContactParameters; -import com.azure.resourcemanager.orbital.models.Spacecraft; -import com.azure.resourcemanager.orbital.models.Spacecrafts; - -public final class SpacecraftsImpl implements Spacecrafts { - private static final ClientLogger LOGGER = new ClientLogger(SpacecraftsImpl.class); - - private final SpacecraftsClient innerClient; - - private final com.azure.resourcemanager.orbital.OrbitalManager serviceManager; - - public SpacecraftsImpl(SpacecraftsClient innerClient, - com.azure.resourcemanager.orbital.OrbitalManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new SpacecraftImpl(inner1, this.manager())); - } - - public PagedIterable list(String skiptoken, Context context) { - PagedIterable inner = this.serviceClient().list(skiptoken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new SpacecraftImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new SpacecraftImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, String skiptoken, Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, skiptoken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new SpacecraftImpl(inner1, this.manager())); - } - - public Response getByResourceGroupWithResponse(String resourceGroupName, String spacecraftName, - Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, spacecraftName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new SpacecraftImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Spacecraft getByResourceGroup(String resourceGroupName, String spacecraftName) { - SpacecraftInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, spacecraftName); - if (inner != null) { - return new SpacecraftImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String spacecraftName) { - this.serviceClient().delete(resourceGroupName, spacecraftName); - } - - public void delete(String resourceGroupName, String spacecraftName, Context context) { - this.serviceClient().delete(resourceGroupName, spacecraftName, context); - } - - public PagedIterable listAvailableContacts(String resourceGroupName, String spacecraftName, - ContactParameters parameters) { - PagedIterable inner - = this.serviceClient().listAvailableContacts(resourceGroupName, spacecraftName, parameters); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AvailableContactsImpl(inner1, this.manager())); - } - - public PagedIterable listAvailableContacts(String resourceGroupName, String spacecraftName, - ContactParameters parameters, Context context) { - PagedIterable inner - = this.serviceClient().listAvailableContacts(resourceGroupName, spacecraftName, parameters, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AvailableContactsImpl(inner1, this.manager())); - } - - public Spacecraft getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String spacecraftName = ResourceManagerUtils.getValueFromIdByName(id, "spacecrafts"); - if (spacecraftName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'spacecrafts'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, spacecraftName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String spacecraftName = ResourceManagerUtils.getValueFromIdByName(id, "spacecrafts"); - if (spacecraftName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'spacecrafts'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, spacecraftName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String spacecraftName = ResourceManagerUtils.getValueFromIdByName(id, "spacecrafts"); - if (spacecraftName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'spacecrafts'.", id))); - } - this.delete(resourceGroupName, spacecraftName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String spacecraftName = ResourceManagerUtils.getValueFromIdByName(id, "spacecrafts"); - if (spacecraftName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'spacecrafts'.", id))); - } - this.delete(resourceGroupName, spacecraftName, context); - } - - private SpacecraftsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.orbital.OrbitalManager manager() { - return this.serviceManager; - } - - public SpacecraftImpl define(String name) { - return new SpacecraftImpl(name, this.manager()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/package-info.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/package-info.java deleted file mode 100644 index 56c7292637c7..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the implementations for AzureOrbital. - * Azure Orbital service. - */ -package com.azure.resourcemanager.orbital.implementation; diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ActionType.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ActionType.java deleted file mode 100644 index f9ee5bed0021..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ActionType.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - */ -public final class ActionType extends ExpandableStringEnum { - /** - * Static value Internal for ActionType. - */ - public static final ActionType INTERNAL = fromString("Internal"); - - /** - * Creates a new instance of ActionType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ActionType() { - } - - /** - * Creates or finds a ActionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ActionType. - */ - public static ActionType fromString(String name) { - return fromString(name, ActionType.class); - } - - /** - * Gets known ActionType values. - * - * @return known ActionType values. - */ - public static Collection values() { - return values(ActionType.class); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AuthorizedGroundstation.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AuthorizedGroundstation.java deleted file mode 100644 index 542d8a981c41..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AuthorizedGroundstation.java +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.LocalDate; -import java.util.Objects; - -/** - * Authorized groundstation. - */ -@Fluent -public final class AuthorizedGroundstation implements JsonSerializable { - /* - * Groundstation name. - */ - private String groundStation; - - /* - * Date of authorization expiration. - */ - private LocalDate expirationDate; - - /** - * Creates an instance of AuthorizedGroundstation class. - */ - public AuthorizedGroundstation() { - } - - /** - * Get the groundStation property: Groundstation name. - * - * @return the groundStation value. - */ - public String groundStation() { - return this.groundStation; - } - - /** - * Set the groundStation property: Groundstation name. - * - * @param groundStation the groundStation value to set. - * @return the AuthorizedGroundstation object itself. - */ - public AuthorizedGroundstation withGroundStation(String groundStation) { - this.groundStation = groundStation; - return this; - } - - /** - * Get the expirationDate property: Date of authorization expiration. - * - * @return the expirationDate value. - */ - public LocalDate expirationDate() { - return this.expirationDate; - } - - /** - * Set the expirationDate property: Date of authorization expiration. - * - * @param expirationDate the expirationDate value to set. - * @return the AuthorizedGroundstation object itself. - */ - public AuthorizedGroundstation withExpirationDate(LocalDate expirationDate) { - this.expirationDate = expirationDate; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (groundStation() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property groundStation in model AuthorizedGroundstation")); - } - if (expirationDate() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property expirationDate in model AuthorizedGroundstation")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AuthorizedGroundstation.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("groundStation", this.groundStation); - jsonWriter.writeStringField("expirationDate", Objects.toString(this.expirationDate, null)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AuthorizedGroundstation from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AuthorizedGroundstation if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the AuthorizedGroundstation. - */ - public static AuthorizedGroundstation fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AuthorizedGroundstation deserializedAuthorizedGroundstation = new AuthorizedGroundstation(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("groundStation".equals(fieldName)) { - deserializedAuthorizedGroundstation.groundStation = reader.getString(); - } else if ("expirationDate".equals(fieldName)) { - deserializedAuthorizedGroundstation.expirationDate - = reader.getNullable(nonNullReader -> LocalDate.parse(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedAuthorizedGroundstation; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AutoTrackingConfiguration.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AutoTrackingConfiguration.java deleted file mode 100644 index 6d16473884ba..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AutoTrackingConfiguration.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -/** - * Auto-tracking configuration. - */ -public enum AutoTrackingConfiguration { - /** - * Enum value disabled. - */ - DISABLED("disabled"), - - /** - * Enum value xBand. - */ - X_BAND("xBand"), - - /** - * Enum value sBand. - */ - S_BAND("sBand"); - - /** - * The actual serialized value for a AutoTrackingConfiguration instance. - */ - private final String value; - - AutoTrackingConfiguration(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a AutoTrackingConfiguration instance. - * - * @param value the serialized value to parse. - * @return the parsed AutoTrackingConfiguration object, or null if unable to parse. - */ - public static AutoTrackingConfiguration fromString(String value) { - if (value == null) { - return null; - } - AutoTrackingConfiguration[] items = AutoTrackingConfiguration.values(); - for (AutoTrackingConfiguration item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableContacts.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableContacts.java deleted file mode 100644 index cb4e9dce1b66..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableContacts.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.resourcemanager.orbital.fluent.models.AvailableContactsInner; -import java.time.OffsetDateTime; - -/** - * An immutable client-side representation of AvailableContacts. - */ -public interface AvailableContacts { - /** - * Gets the spacecraft property: The reference to the spacecraft resource. - * - * @return the spacecraft value. - */ - AvailableContactsSpacecraft spacecraft(); - - /** - * Gets the groundStationName property: Name of Azure Ground Station. - * - * @return the groundStationName value. - */ - String groundStationName(); - - /** - * Gets the maximumElevationDegrees property: Maximum elevation of the antenna during the contact in decimal - * degrees. - * - * @return the maximumElevationDegrees value. - */ - Float maximumElevationDegrees(); - - /** - * Gets the txStartTime property: Time at which antenna transmit will be enabled (ISO 8601 UTC standard). - * - * @return the txStartTime value. - */ - OffsetDateTime txStartTime(); - - /** - * Gets the txEndTime property: Time at which antenna transmit will be disabled (ISO 8601 UTC standard). - * - * @return the txEndTime value. - */ - OffsetDateTime txEndTime(); - - /** - * Gets the rxStartTime property: Earliest time to receive a signal (ISO 8601 UTC standard). - * - * @return the rxStartTime value. - */ - OffsetDateTime rxStartTime(); - - /** - * Gets the rxEndTime property: Time to lost receiving a signal (ISO 8601 UTC standard). - * - * @return the rxEndTime value. - */ - OffsetDateTime rxEndTime(); - - /** - * Gets the startAzimuthDegrees property: Azimuth of the antenna at the start of the contact in decimal degrees. - * - * @return the startAzimuthDegrees value. - */ - Float startAzimuthDegrees(); - - /** - * Gets the endAzimuthDegrees property: Azimuth of the antenna at the end of the contact in decimal degrees. - * - * @return the endAzimuthDegrees value. - */ - Float endAzimuthDegrees(); - - /** - * Gets the startElevationDegrees property: Spacecraft elevation above the horizon at contact start. - * - * @return the startElevationDegrees value. - */ - Float startElevationDegrees(); - - /** - * Gets the endElevationDegrees property: Spacecraft elevation above the horizon at contact end. - * - * @return the endElevationDegrees value. - */ - Float endElevationDegrees(); - - /** - * Gets the inner com.azure.resourcemanager.orbital.fluent.models.AvailableContactsInner object. - * - * @return the inner object. - */ - AvailableContactsInner innerModel(); -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableContactsListResult.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableContactsListResult.java deleted file mode 100644 index 8d10f9318edb..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableContactsListResult.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.orbital.fluent.models.AvailableContactsInner; -import java.io.IOException; -import java.util.List; - -/** - * Response for the ListAvailableContacts API service call. - */ -@Fluent -public final class AvailableContactsListResult implements JsonSerializable { - /* - * A list of available contacts. - */ - private List value; - - /* - * The URL to get the next set of results. - */ - private String nextLink; - - /** - * Creates an instance of AvailableContactsListResult class. - */ - public AvailableContactsListResult() { - } - - /** - * Get the value property: A list of available contacts. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: A list of available contacts. - * - * @param value the value value to set. - * @return the AvailableContactsListResult object itself. - */ - public AvailableContactsListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URL to get the next set of results. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AvailableContactsListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AvailableContactsListResult if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AvailableContactsListResult. - */ - public static AvailableContactsListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AvailableContactsListResult deserializedAvailableContactsListResult = new AvailableContactsListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> AvailableContactsInner.fromJson(reader1)); - deserializedAvailableContactsListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedAvailableContactsListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAvailableContactsListResult; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableContactsSpacecraft.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableContactsSpacecraft.java deleted file mode 100644 index 75ba14391372..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableContactsSpacecraft.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The reference to the spacecraft resource. - */ -@Fluent -public final class AvailableContactsSpacecraft extends ResourceReference { - /** - * Creates an instance of AvailableContactsSpacecraft class. - */ - public AvailableContactsSpacecraft() { - } - - /** - * {@inheritDoc} - */ - @Override - public AvailableContactsSpacecraft withId(String id) { - super.withId(id); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (id() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property id in model AvailableContactsSpacecraft")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AvailableContactsSpacecraft.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", id()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AvailableContactsSpacecraft from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AvailableContactsSpacecraft if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the AvailableContactsSpacecraft. - */ - public static AvailableContactsSpacecraft fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AvailableContactsSpacecraft deserializedAvailableContactsSpacecraft = new AvailableContactsSpacecraft(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedAvailableContactsSpacecraft.withId(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedAvailableContactsSpacecraft; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableGroundStation.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableGroundStation.java deleted file mode 100644 index c1e59e149fd9..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableGroundStation.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.resourcemanager.orbital.fluent.models.AvailableGroundStationInner; - -/** - * An immutable client-side representation of AvailableGroundStation. - */ -public interface AvailableGroundStation { - /** - * Gets the id property: ID of groundStation. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: Name of the ground station. - * - * @return the name value. - */ - String name(); - - /** - * Gets the location property: Azure region. - * - * @return the location value. - */ - String location(); - - /** - * Gets the type property: Resource type. - * - * @return the type value. - */ - String type(); - - /** - * Gets the city property: City of ground station. - * - * @return the city value. - */ - String city(); - - /** - * Gets the providerName property: Ground station provider name. - * - * @return the providerName value. - */ - String providerName(); - - /** - * Gets the longitudeDegrees property: Longitude of the ground station in decimal degrees. - * - * @return the longitudeDegrees value. - */ - Float longitudeDegrees(); - - /** - * Gets the latitudeDegrees property: Latitude of the ground station in decimal degrees. - * - * @return the latitudeDegrees value. - */ - Float latitudeDegrees(); - - /** - * Gets the altitudeMeters property: Altitude of the ground station. - * - * @return the altitudeMeters value. - */ - Float altitudeMeters(); - - /** - * Gets the releaseMode property: Release Status of a ground station. - * - * @return the releaseMode value. - */ - ReleaseMode releaseMode(); - - /** - * Gets the inner com.azure.resourcemanager.orbital.fluent.models.AvailableGroundStationInner object. - * - * @return the inner object. - */ - AvailableGroundStationInner innerModel(); -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableGroundStationListResult.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableGroundStationListResult.java deleted file mode 100644 index 5422f825baf8..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableGroundStationListResult.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.orbital.fluent.models.AvailableGroundStationInner; -import java.io.IOException; -import java.util.List; - -/** - * Response for the AvailableGroundStations API service call. - */ -@Fluent -public final class AvailableGroundStationListResult implements JsonSerializable { - /* - * A list of ground station resources. - */ - private List value; - - /* - * The URL to get the next set of results. - */ - private String nextLink; - - /** - * Creates an instance of AvailableGroundStationListResult class. - */ - public AvailableGroundStationListResult() { - } - - /** - * Get the value property: A list of ground station resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: A list of ground station resources. - * - * @param value the value value to set. - * @return the AvailableGroundStationListResult object itself. - */ - public AvailableGroundStationListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URL to get the next set of results. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AvailableGroundStationListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AvailableGroundStationListResult if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AvailableGroundStationListResult. - */ - public static AvailableGroundStationListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AvailableGroundStationListResult deserializedAvailableGroundStationListResult - = new AvailableGroundStationListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> AvailableGroundStationInner.fromJson(reader1)); - deserializedAvailableGroundStationListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedAvailableGroundStationListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAvailableGroundStationListResult; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableGroundStationPropertiesAutoGenerated.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableGroundStationPropertiesAutoGenerated.java deleted file mode 100644 index 21cd7a5ce281..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableGroundStationPropertiesAutoGenerated.java +++ /dev/null @@ -1,239 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties object for Available groundstation. - */ -@Fluent -public class AvailableGroundStationPropertiesAutoGenerated - implements JsonSerializable { - /* - * City of ground station. - */ - private String city; - - /* - * Ground station provider name. - */ - private String providerName; - - /* - * Longitude of the ground station in decimal degrees. - */ - private Float longitudeDegrees; - - /* - * Latitude of the ground station in decimal degrees. - */ - private Float latitudeDegrees; - - /* - * Altitude of the ground station. - */ - private Float altitudeMeters; - - /* - * Release Status of a ground station. - */ - private ReleaseMode releaseMode; - - /** - * Creates an instance of AvailableGroundStationPropertiesAutoGenerated class. - */ - public AvailableGroundStationPropertiesAutoGenerated() { - } - - /** - * Get the city property: City of ground station. - * - * @return the city value. - */ - public String city() { - return this.city; - } - - /** - * Set the city property: City of ground station. - * - * @param city the city value to set. - * @return the AvailableGroundStationPropertiesAutoGenerated object itself. - */ - public AvailableGroundStationPropertiesAutoGenerated withCity(String city) { - this.city = city; - return this; - } - - /** - * Get the providerName property: Ground station provider name. - * - * @return the providerName value. - */ - public String providerName() { - return this.providerName; - } - - /** - * Set the providerName property: Ground station provider name. - * - * @param providerName the providerName value to set. - * @return the AvailableGroundStationPropertiesAutoGenerated object itself. - */ - public AvailableGroundStationPropertiesAutoGenerated withProviderName(String providerName) { - this.providerName = providerName; - return this; - } - - /** - * Get the longitudeDegrees property: Longitude of the ground station in decimal degrees. - * - * @return the longitudeDegrees value. - */ - public Float longitudeDegrees() { - return this.longitudeDegrees; - } - - /** - * Set the longitudeDegrees property: Longitude of the ground station in decimal degrees. - * - * @param longitudeDegrees the longitudeDegrees value to set. - * @return the AvailableGroundStationPropertiesAutoGenerated object itself. - */ - public AvailableGroundStationPropertiesAutoGenerated withLongitudeDegrees(Float longitudeDegrees) { - this.longitudeDegrees = longitudeDegrees; - return this; - } - - /** - * Get the latitudeDegrees property: Latitude of the ground station in decimal degrees. - * - * @return the latitudeDegrees value. - */ - public Float latitudeDegrees() { - return this.latitudeDegrees; - } - - /** - * Set the latitudeDegrees property: Latitude of the ground station in decimal degrees. - * - * @param latitudeDegrees the latitudeDegrees value to set. - * @return the AvailableGroundStationPropertiesAutoGenerated object itself. - */ - public AvailableGroundStationPropertiesAutoGenerated withLatitudeDegrees(Float latitudeDegrees) { - this.latitudeDegrees = latitudeDegrees; - return this; - } - - /** - * Get the altitudeMeters property: Altitude of the ground station. - * - * @return the altitudeMeters value. - */ - public Float altitudeMeters() { - return this.altitudeMeters; - } - - /** - * Set the altitudeMeters property: Altitude of the ground station. - * - * @param altitudeMeters the altitudeMeters value to set. - * @return the AvailableGroundStationPropertiesAutoGenerated object itself. - */ - public AvailableGroundStationPropertiesAutoGenerated withAltitudeMeters(Float altitudeMeters) { - this.altitudeMeters = altitudeMeters; - return this; - } - - /** - * Get the releaseMode property: Release Status of a ground station. - * - * @return the releaseMode value. - */ - public ReleaseMode releaseMode() { - return this.releaseMode; - } - - /** - * Set the releaseMode property: Release Status of a ground station. - * - * @param releaseMode the releaseMode value to set. - * @return the AvailableGroundStationPropertiesAutoGenerated object itself. - */ - public AvailableGroundStationPropertiesAutoGenerated withReleaseMode(ReleaseMode releaseMode) { - this.releaseMode = releaseMode; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("city", this.city); - jsonWriter.writeStringField("providerName", this.providerName); - jsonWriter.writeNumberField("longitudeDegrees", this.longitudeDegrees); - jsonWriter.writeNumberField("latitudeDegrees", this.latitudeDegrees); - jsonWriter.writeNumberField("altitudeMeters", this.altitudeMeters); - jsonWriter.writeStringField("releaseMode", this.releaseMode == null ? null : this.releaseMode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AvailableGroundStationPropertiesAutoGenerated from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AvailableGroundStationPropertiesAutoGenerated if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AvailableGroundStationPropertiesAutoGenerated. - */ - public static AvailableGroundStationPropertiesAutoGenerated fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AvailableGroundStationPropertiesAutoGenerated deserializedAvailableGroundStationPropertiesAutoGenerated - = new AvailableGroundStationPropertiesAutoGenerated(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("city".equals(fieldName)) { - deserializedAvailableGroundStationPropertiesAutoGenerated.city = reader.getString(); - } else if ("providerName".equals(fieldName)) { - deserializedAvailableGroundStationPropertiesAutoGenerated.providerName = reader.getString(); - } else if ("longitudeDegrees".equals(fieldName)) { - deserializedAvailableGroundStationPropertiesAutoGenerated.longitudeDegrees - = reader.getNullable(JsonReader::getFloat); - } else if ("latitudeDegrees".equals(fieldName)) { - deserializedAvailableGroundStationPropertiesAutoGenerated.latitudeDegrees - = reader.getNullable(JsonReader::getFloat); - } else if ("altitudeMeters".equals(fieldName)) { - deserializedAvailableGroundStationPropertiesAutoGenerated.altitudeMeters - = reader.getNullable(JsonReader::getFloat); - } else if ("releaseMode".equals(fieldName)) { - deserializedAvailableGroundStationPropertiesAutoGenerated.releaseMode - = ReleaseMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedAvailableGroundStationPropertiesAutoGenerated; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableGroundStations.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableGroundStations.java deleted file mode 100644 index 84a787ae509d..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableGroundStations.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** - * Resource collection API of AvailableGroundStations. - */ -public interface AvailableGroundStations { - /** - * Returns list of available ground stations. - * - * @param capability Ground Station Capability. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the AvailableGroundStations API service call as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(CapabilityParameter capability); - - /** - * Returns list of available ground stations. - * - * @param capability Ground Station Capability. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the AvailableGroundStations API service call as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(CapabilityParameter capability, Context context); -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/CapabilityParameter.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/CapabilityParameter.java deleted file mode 100644 index a2c197f644b9..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/CapabilityParameter.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for CapabilityParameter. - */ -public final class CapabilityParameter extends ExpandableStringEnum { - /** - * Static value EarthObservation for CapabilityParameter. - */ - public static final CapabilityParameter EARTH_OBSERVATION = fromString("EarthObservation"); - - /** - * Static value Communication for CapabilityParameter. - */ - public static final CapabilityParameter COMMUNICATION = fromString("Communication"); - - /** - * Creates a new instance of CapabilityParameter value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public CapabilityParameter() { - } - - /** - * Creates or finds a CapabilityParameter from its string representation. - * - * @param name a name to look for. - * @return the corresponding CapabilityParameter. - */ - public static CapabilityParameter fromString(String name) { - return fromString(name, CapabilityParameter.class); - } - - /** - * Gets known CapabilityParameter values. - * - * @return known CapabilityParameter values. - */ - public static Collection values() { - return values(CapabilityParameter.class); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Contact.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Contact.java deleted file mode 100644 index 8c45fabc71b7..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Contact.java +++ /dev/null @@ -1,306 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.orbital.fluent.models.ContactInner; -import java.time.OffsetDateTime; - -/** - * An immutable client-side representation of Contact. - */ -public interface Contact { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the provisioningState property: The current state of the resource's creation, deletion, or modification. - * - * @return the provisioningState value. - */ - ContactsPropertiesProvisioningState provisioningState(); - - /** - * Gets the status property: Status of a contact. - * - * @return the status value. - */ - ContactsStatus status(); - - /** - * Gets the reservationStartTime property: Reservation start time of a contact (ISO 8601 UTC standard). - * - * @return the reservationStartTime value. - */ - OffsetDateTime reservationStartTime(); - - /** - * Gets the reservationEndTime property: Reservation end time of a contact (ISO 8601 UTC standard). - * - * @return the reservationEndTime value. - */ - OffsetDateTime reservationEndTime(); - - /** - * Gets the rxStartTime property: Receive start time of a contact (ISO 8601 UTC standard). - * - * @return the rxStartTime value. - */ - OffsetDateTime rxStartTime(); - - /** - * Gets the rxEndTime property: Receive end time of a contact (ISO 8601 UTC standard). - * - * @return the rxEndTime value. - */ - OffsetDateTime rxEndTime(); - - /** - * Gets the txStartTime property: Transmit start time of a contact (ISO 8601 UTC standard). - * - * @return the txStartTime value. - */ - OffsetDateTime txStartTime(); - - /** - * Gets the txEndTime property: Transmit end time of a contact (ISO 8601 UTC standard). - * - * @return the txEndTime value. - */ - OffsetDateTime txEndTime(); - - /** - * Gets the errorMessage property: Any error message while scheduling a contact. - * - * @return the errorMessage value. - */ - String errorMessage(); - - /** - * Gets the maximumElevationDegrees property: Maximum elevation of the antenna during the contact in decimal - * degrees. - * - * @return the maximumElevationDegrees value. - */ - Float maximumElevationDegrees(); - - /** - * Gets the startAzimuthDegrees property: Azimuth of the antenna at the start of the contact in decimal degrees. - * - * @return the startAzimuthDegrees value. - */ - Float startAzimuthDegrees(); - - /** - * Gets the endAzimuthDegrees property: Azimuth of the antenna at the end of the contact in decimal degrees. - * - * @return the endAzimuthDegrees value. - */ - Float endAzimuthDegrees(); - - /** - * Gets the groundStationName property: Azure Ground Station name. - * - * @return the groundStationName value. - */ - String groundStationName(); - - /** - * Gets the startElevationDegrees property: Spacecraft elevation above the horizon at contact start. - * - * @return the startElevationDegrees value. - */ - Float startElevationDegrees(); - - /** - * Gets the endElevationDegrees property: Spacecraft elevation above the horizon at contact end. - * - * @return the endElevationDegrees value. - */ - Float endElevationDegrees(); - - /** - * Gets the antennaConfiguration property: The configuration associated with the allocated antenna. - * - * @return the antennaConfiguration value. - */ - ContactsPropertiesAntennaConfiguration antennaConfiguration(); - - /** - * Gets the contactProfile property: The reference to the contact profile resource. - * - * @return the contactProfile value. - */ - ContactsPropertiesContactProfile contactProfile(); - - /** - * Gets the inner com.azure.resourcemanager.orbital.fluent.models.ContactInner object. - * - * @return the inner object. - */ - ContactInner innerModel(); - - /** - * The entirety of the Contact definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, - DefinitionStages.WithReservationStartTime, DefinitionStages.WithReservationEndTime, - DefinitionStages.WithGroundStationName, DefinitionStages.WithContactProfile, DefinitionStages.WithCreate { - } - - /** - * The Contact definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the Contact definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the Contact definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, spacecraftName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @return the next definition stage. - */ - WithReservationStartTime withExistingSpacecraft(String resourceGroupName, String spacecraftName); - } - - /** - * The stage of the Contact definition allowing to specify reservationStartTime. - */ - interface WithReservationStartTime { - /** - * Specifies the reservationStartTime property: Reservation start time of a contact (ISO 8601 UTC - * standard).. - * - * @param reservationStartTime Reservation start time of a contact (ISO 8601 UTC standard). - * @return the next definition stage. - */ - WithReservationEndTime withReservationStartTime(OffsetDateTime reservationStartTime); - } - - /** - * The stage of the Contact definition allowing to specify reservationEndTime. - */ - interface WithReservationEndTime { - /** - * Specifies the reservationEndTime property: Reservation end time of a contact (ISO 8601 UTC standard).. - * - * @param reservationEndTime Reservation end time of a contact (ISO 8601 UTC standard). - * @return the next definition stage. - */ - WithGroundStationName withReservationEndTime(OffsetDateTime reservationEndTime); - } - - /** - * The stage of the Contact definition allowing to specify groundStationName. - */ - interface WithGroundStationName { - /** - * Specifies the groundStationName property: Azure Ground Station name.. - * - * @param groundStationName Azure Ground Station name. - * @return the next definition stage. - */ - WithContactProfile withGroundStationName(String groundStationName); - } - - /** - * The stage of the Contact definition allowing to specify contactProfile. - */ - interface WithContactProfile { - /** - * Specifies the contactProfile property: The reference to the contact profile resource.. - * - * @param contactProfile The reference to the contact profile resource. - * @return the next definition stage. - */ - WithCreate withContactProfile(ContactsPropertiesContactProfile contactProfile); - } - - /** - * The stage of the Contact definition which contains all the minimum required properties for the resource to be - * created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithProvisioningState { - /** - * Executes the create request. - * - * @return the created resource. - */ - Contact create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Contact create(Context context); - } - - /** - * The stage of the Contact definition allowing to specify provisioningState. - */ - interface WithProvisioningState { - /** - * Specifies the provisioningState property: The current state of the resource's creation, deletion, or - * modification.. - * - * @param provisioningState The current state of the resource's creation, deletion, or modification. - * @return the next definition stage. - */ - WithCreate withProvisioningState(ContactsPropertiesProvisioningState provisioningState); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Contact refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Contact refresh(Context context); -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactInstanceProperties.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactInstanceProperties.java deleted file mode 100644 index 6d12718b2fd3..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactInstanceProperties.java +++ /dev/null @@ -1,318 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * Contact Instance Properties. - */ -@Immutable -public class ContactInstanceProperties implements JsonSerializable { - /* - * Maximum elevation of the antenna during the contact in decimal degrees. - */ - private Float maximumElevationDegrees; - - /* - * Time at which antenna transmit will be enabled (ISO 8601 UTC standard). - */ - private OffsetDateTime txStartTime; - - /* - * Time at which antenna transmit will be disabled (ISO 8601 UTC standard). - */ - private OffsetDateTime txEndTime; - - /* - * Earliest time to receive a signal (ISO 8601 UTC standard). - */ - private OffsetDateTime rxStartTime; - - /* - * Time to lost receiving a signal (ISO 8601 UTC standard). - */ - private OffsetDateTime rxEndTime; - - /* - * Azimuth of the antenna at the start of the contact in decimal degrees. - */ - private Float startAzimuthDegrees; - - /* - * Azimuth of the antenna at the end of the contact in decimal degrees. - */ - private Float endAzimuthDegrees; - - /* - * Spacecraft elevation above the horizon at contact start. - */ - private Float startElevationDegrees; - - /* - * Spacecraft elevation above the horizon at contact end. - */ - private Float endElevationDegrees; - - /** - * Creates an instance of ContactInstanceProperties class. - */ - public ContactInstanceProperties() { - } - - /** - * Get the maximumElevationDegrees property: Maximum elevation of the antenna during the contact in decimal degrees. - * - * @return the maximumElevationDegrees value. - */ - public Float maximumElevationDegrees() { - return this.maximumElevationDegrees; - } - - /** - * Set the maximumElevationDegrees property: Maximum elevation of the antenna during the contact in decimal degrees. - * - * @param maximumElevationDegrees the maximumElevationDegrees value to set. - * @return the ContactInstanceProperties object itself. - */ - ContactInstanceProperties withMaximumElevationDegrees(Float maximumElevationDegrees) { - this.maximumElevationDegrees = maximumElevationDegrees; - return this; - } - - /** - * Get the txStartTime property: Time at which antenna transmit will be enabled (ISO 8601 UTC standard). - * - * @return the txStartTime value. - */ - public OffsetDateTime txStartTime() { - return this.txStartTime; - } - - /** - * Set the txStartTime property: Time at which antenna transmit will be enabled (ISO 8601 UTC standard). - * - * @param txStartTime the txStartTime value to set. - * @return the ContactInstanceProperties object itself. - */ - ContactInstanceProperties withTxStartTime(OffsetDateTime txStartTime) { - this.txStartTime = txStartTime; - return this; - } - - /** - * Get the txEndTime property: Time at which antenna transmit will be disabled (ISO 8601 UTC standard). - * - * @return the txEndTime value. - */ - public OffsetDateTime txEndTime() { - return this.txEndTime; - } - - /** - * Set the txEndTime property: Time at which antenna transmit will be disabled (ISO 8601 UTC standard). - * - * @param txEndTime the txEndTime value to set. - * @return the ContactInstanceProperties object itself. - */ - ContactInstanceProperties withTxEndTime(OffsetDateTime txEndTime) { - this.txEndTime = txEndTime; - return this; - } - - /** - * Get the rxStartTime property: Earliest time to receive a signal (ISO 8601 UTC standard). - * - * @return the rxStartTime value. - */ - public OffsetDateTime rxStartTime() { - return this.rxStartTime; - } - - /** - * Set the rxStartTime property: Earliest time to receive a signal (ISO 8601 UTC standard). - * - * @param rxStartTime the rxStartTime value to set. - * @return the ContactInstanceProperties object itself. - */ - ContactInstanceProperties withRxStartTime(OffsetDateTime rxStartTime) { - this.rxStartTime = rxStartTime; - return this; - } - - /** - * Get the rxEndTime property: Time to lost receiving a signal (ISO 8601 UTC standard). - * - * @return the rxEndTime value. - */ - public OffsetDateTime rxEndTime() { - return this.rxEndTime; - } - - /** - * Set the rxEndTime property: Time to lost receiving a signal (ISO 8601 UTC standard). - * - * @param rxEndTime the rxEndTime value to set. - * @return the ContactInstanceProperties object itself. - */ - ContactInstanceProperties withRxEndTime(OffsetDateTime rxEndTime) { - this.rxEndTime = rxEndTime; - return this; - } - - /** - * Get the startAzimuthDegrees property: Azimuth of the antenna at the start of the contact in decimal degrees. - * - * @return the startAzimuthDegrees value. - */ - public Float startAzimuthDegrees() { - return this.startAzimuthDegrees; - } - - /** - * Set the startAzimuthDegrees property: Azimuth of the antenna at the start of the contact in decimal degrees. - * - * @param startAzimuthDegrees the startAzimuthDegrees value to set. - * @return the ContactInstanceProperties object itself. - */ - ContactInstanceProperties withStartAzimuthDegrees(Float startAzimuthDegrees) { - this.startAzimuthDegrees = startAzimuthDegrees; - return this; - } - - /** - * Get the endAzimuthDegrees property: Azimuth of the antenna at the end of the contact in decimal degrees. - * - * @return the endAzimuthDegrees value. - */ - public Float endAzimuthDegrees() { - return this.endAzimuthDegrees; - } - - /** - * Set the endAzimuthDegrees property: Azimuth of the antenna at the end of the contact in decimal degrees. - * - * @param endAzimuthDegrees the endAzimuthDegrees value to set. - * @return the ContactInstanceProperties object itself. - */ - ContactInstanceProperties withEndAzimuthDegrees(Float endAzimuthDegrees) { - this.endAzimuthDegrees = endAzimuthDegrees; - return this; - } - - /** - * Get the startElevationDegrees property: Spacecraft elevation above the horizon at contact start. - * - * @return the startElevationDegrees value. - */ - public Float startElevationDegrees() { - return this.startElevationDegrees; - } - - /** - * Set the startElevationDegrees property: Spacecraft elevation above the horizon at contact start. - * - * @param startElevationDegrees the startElevationDegrees value to set. - * @return the ContactInstanceProperties object itself. - */ - ContactInstanceProperties withStartElevationDegrees(Float startElevationDegrees) { - this.startElevationDegrees = startElevationDegrees; - return this; - } - - /** - * Get the endElevationDegrees property: Spacecraft elevation above the horizon at contact end. - * - * @return the endElevationDegrees value. - */ - public Float endElevationDegrees() { - return this.endElevationDegrees; - } - - /** - * Set the endElevationDegrees property: Spacecraft elevation above the horizon at contact end. - * - * @param endElevationDegrees the endElevationDegrees value to set. - * @return the ContactInstanceProperties object itself. - */ - ContactInstanceProperties withEndElevationDegrees(Float endElevationDegrees) { - this.endElevationDegrees = endElevationDegrees; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContactInstanceProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContactInstanceProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ContactInstanceProperties. - */ - public static ContactInstanceProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContactInstanceProperties deserializedContactInstanceProperties = new ContactInstanceProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("maximumElevationDegrees".equals(fieldName)) { - deserializedContactInstanceProperties.maximumElevationDegrees - = reader.getNullable(JsonReader::getFloat); - } else if ("txStartTime".equals(fieldName)) { - deserializedContactInstanceProperties.txStartTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("txEndTime".equals(fieldName)) { - deserializedContactInstanceProperties.txEndTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("rxStartTime".equals(fieldName)) { - deserializedContactInstanceProperties.rxStartTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("rxEndTime".equals(fieldName)) { - deserializedContactInstanceProperties.rxEndTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("startAzimuthDegrees".equals(fieldName)) { - deserializedContactInstanceProperties.startAzimuthDegrees - = reader.getNullable(JsonReader::getFloat); - } else if ("endAzimuthDegrees".equals(fieldName)) { - deserializedContactInstanceProperties.endAzimuthDegrees = reader.getNullable(JsonReader::getFloat); - } else if ("startElevationDegrees".equals(fieldName)) { - deserializedContactInstanceProperties.startElevationDegrees - = reader.getNullable(JsonReader::getFloat); - } else if ("endElevationDegrees".equals(fieldName)) { - deserializedContactInstanceProperties.endElevationDegrees - = reader.getNullable(JsonReader::getFloat); - } else { - reader.skipChildren(); - } - } - - return deserializedContactInstanceProperties; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactListResult.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactListResult.java deleted file mode 100644 index 1617b8444532..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactListResult.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.orbital.fluent.models.ContactInner; -import java.io.IOException; -import java.util.List; - -/** - * Response for the ListContacts API service call. - */ -@Fluent -public final class ContactListResult implements JsonSerializable { - /* - * A list of contact resources in a resource group. - */ - private List value; - - /* - * The URL to get the next set of results. - */ - private String nextLink; - - /** - * Creates an instance of ContactListResult class. - */ - public ContactListResult() { - } - - /** - * Get the value property: A list of contact resources in a resource group. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: A list of contact resources in a resource group. - * - * @param value the value value to set. - * @return the ContactListResult object itself. - */ - public ContactListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URL to get the next set of results. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContactListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContactListResult if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ContactListResult. - */ - public static ContactListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContactListResult deserializedContactListResult = new ContactListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> ContactInner.fromJson(reader1)); - deserializedContactListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedContactListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedContactListResult; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactParameters.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactParameters.java deleted file mode 100644 index 9d6a5963c541..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactParameters.java +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; - -/** - * Parameters that define the contact resource. - */ -@Fluent -public final class ContactParameters implements JsonSerializable { - /* - * The reference to the contact profile resource. - */ - private ContactParametersContactProfile contactProfile; - - /* - * Name of Azure Ground Station. - */ - private String groundStationName; - - /* - * Start time of a contact (ISO 8601 UTC standard). - */ - private OffsetDateTime startTime; - - /* - * End time of a contact (ISO 8601 UTC standard). - */ - private OffsetDateTime endTime; - - /** - * Creates an instance of ContactParameters class. - */ - public ContactParameters() { - } - - /** - * Get the contactProfile property: The reference to the contact profile resource. - * - * @return the contactProfile value. - */ - public ContactParametersContactProfile contactProfile() { - return this.contactProfile; - } - - /** - * Set the contactProfile property: The reference to the contact profile resource. - * - * @param contactProfile the contactProfile value to set. - * @return the ContactParameters object itself. - */ - public ContactParameters withContactProfile(ContactParametersContactProfile contactProfile) { - this.contactProfile = contactProfile; - return this; - } - - /** - * Get the groundStationName property: Name of Azure Ground Station. - * - * @return the groundStationName value. - */ - public String groundStationName() { - return this.groundStationName; - } - - /** - * Set the groundStationName property: Name of Azure Ground Station. - * - * @param groundStationName the groundStationName value to set. - * @return the ContactParameters object itself. - */ - public ContactParameters withGroundStationName(String groundStationName) { - this.groundStationName = groundStationName; - return this; - } - - /** - * Get the startTime property: Start time of a contact (ISO 8601 UTC standard). - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Set the startTime property: Start time of a contact (ISO 8601 UTC standard). - * - * @param startTime the startTime value to set. - * @return the ContactParameters object itself. - */ - public ContactParameters withStartTime(OffsetDateTime startTime) { - this.startTime = startTime; - return this; - } - - /** - * Get the endTime property: End time of a contact (ISO 8601 UTC standard). - * - * @return the endTime value. - */ - public OffsetDateTime endTime() { - return this.endTime; - } - - /** - * Set the endTime property: End time of a contact (ISO 8601 UTC standard). - * - * @param endTime the endTime value to set. - * @return the ContactParameters object itself. - */ - public ContactParameters withEndTime(OffsetDateTime endTime) { - this.endTime = endTime; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (contactProfile() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property contactProfile in model ContactParameters")); - } else { - contactProfile().validate(); - } - if (groundStationName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property groundStationName in model ContactParameters")); - } - if (startTime() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property startTime in model ContactParameters")); - } - if (endTime() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property endTime in model ContactParameters")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContactParameters.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("contactProfile", this.contactProfile); - jsonWriter.writeStringField("groundStationName", this.groundStationName); - jsonWriter.writeStringField("startTime", - this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); - jsonWriter.writeStringField("endTime", - this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContactParameters from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContactParameters if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ContactParameters. - */ - public static ContactParameters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContactParameters deserializedContactParameters = new ContactParameters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("contactProfile".equals(fieldName)) { - deserializedContactParameters.contactProfile = ContactParametersContactProfile.fromJson(reader); - } else if ("groundStationName".equals(fieldName)) { - deserializedContactParameters.groundStationName = reader.getString(); - } else if ("startTime".equals(fieldName)) { - deserializedContactParameters.startTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("endTime".equals(fieldName)) { - deserializedContactParameters.endTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedContactParameters; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactParametersContactProfile.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactParametersContactProfile.java deleted file mode 100644 index 67a06fbc9b73..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactParametersContactProfile.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The reference to the contact profile resource. - */ -@Fluent -public final class ContactParametersContactProfile extends ResourceReference { - /** - * Creates an instance of ContactParametersContactProfile class. - */ - public ContactParametersContactProfile() { - } - - /** - * {@inheritDoc} - */ - @Override - public ContactParametersContactProfile withId(String id) { - super.withId(id); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (id() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property id in model ContactParametersContactProfile")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContactParametersContactProfile.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", id()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContactParametersContactProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContactParametersContactProfile if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ContactParametersContactProfile. - */ - public static ContactParametersContactProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContactParametersContactProfile deserializedContactParametersContactProfile - = new ContactParametersContactProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedContactParametersContactProfile.withId(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedContactParametersContactProfile; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfile.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfile.java deleted file mode 100644 index 36a673f55c73..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfile.java +++ /dev/null @@ -1,412 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.orbital.fluent.models.ContactProfileInner; -import java.util.List; -import java.util.Map; - -/** - * An immutable client-side representation of ContactProfile. - */ -public interface ContactProfile { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the provisioningState property: The current state of the resource's creation, deletion, or modification. - * - * @return the provisioningState value. - */ - ContactProfilesPropertiesProvisioningState provisioningState(); - - /** - * Gets the minimumViableContactDuration property: Minimum viable contact duration in ISO 8601 format. Used for - * listing the available contacts with a spacecraft at a given ground station. - * - * @return the minimumViableContactDuration value. - */ - String minimumViableContactDuration(); - - /** - * Gets the minimumElevationDegrees property: Minimum viable elevation for the contact in decimal degrees. Used for - * listing the available contacts with a spacecraft at a given ground station. - * - * @return the minimumElevationDegrees value. - */ - Float minimumElevationDegrees(); - - /** - * Gets the autoTrackingConfiguration property: Auto-tracking configuration. - * - * @return the autoTrackingConfiguration value. - */ - AutoTrackingConfiguration autoTrackingConfiguration(); - - /** - * Gets the eventHubUri property: ARM resource identifier of the Event Hub used for telemetry. Requires granting - * Orbital Resource Provider the rights to send telemetry into the hub. - * - * @return the eventHubUri value. - */ - String eventHubUri(); - - /** - * Gets the networkConfiguration property: Network configuration of customer virtual network. - * - * @return the networkConfiguration value. - */ - ContactProfilesPropertiesNetworkConfiguration networkConfiguration(); - - /** - * Gets the thirdPartyConfigurations property: Third-party mission configuration of the Contact Profile. Describes - * RF links, modem processing, and IP endpoints. - * - * @return the thirdPartyConfigurations value. - */ - List thirdPartyConfigurations(); - - /** - * Gets the links property: Links of the Contact Profile. Describes RF links, modem processing, and IP endpoints. - * - * @return the links value. - */ - List links(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.orbital.fluent.models.ContactProfileInner object. - * - * @return the inner object. - */ - ContactProfileInner innerModel(); - - /** - * The entirety of the ContactProfile definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithLocation, DefinitionStages.WithResourceGroup, - DefinitionStages.WithNetworkConfiguration, DefinitionStages.WithLinks, DefinitionStages.WithCreate { - } - - /** - * The ContactProfile definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the ContactProfile definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the ContactProfile definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(String location); - } - - /** - * The stage of the ContactProfile definition allowing to specify parent resource. - */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @return the next definition stage. - */ - WithNetworkConfiguration withExistingResourceGroup(String resourceGroupName); - } - - /** - * The stage of the ContactProfile definition allowing to specify networkConfiguration. - */ - interface WithNetworkConfiguration { - /** - * Specifies the networkConfiguration property: Network configuration of customer virtual network.. - * - * @param networkConfiguration Network configuration of customer virtual network. - * @return the next definition stage. - */ - WithLinks withNetworkConfiguration(ContactProfilesPropertiesNetworkConfiguration networkConfiguration); - } - - /** - * The stage of the ContactProfile definition allowing to specify links. - */ - interface WithLinks { - /** - * Specifies the links property: Links of the Contact Profile. Describes RF links, modem processing, and IP - * endpoints.. - * - * @param links Links of the Contact Profile. Describes RF links, modem processing, and IP endpoints. - * @return the next definition stage. - */ - WithCreate withLinks(List links); - } - - /** - * The stage of the ContactProfile definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProvisioningState, - DefinitionStages.WithMinimumViableContactDuration, DefinitionStages.WithMinimumElevationDegrees, - DefinitionStages.WithAutoTrackingConfiguration, DefinitionStages.WithEventHubUri, - DefinitionStages.WithThirdPartyConfigurations { - /** - * Executes the create request. - * - * @return the created resource. - */ - ContactProfile create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ContactProfile create(Context context); - } - - /** - * The stage of the ContactProfile definition allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - - /** - * The stage of the ContactProfile definition allowing to specify provisioningState. - */ - interface WithProvisioningState { - /** - * Specifies the provisioningState property: The current state of the resource's creation, deletion, or - * modification.. - * - * @param provisioningState The current state of the resource's creation, deletion, or modification. - * @return the next definition stage. - */ - WithCreate withProvisioningState(ContactProfilesPropertiesProvisioningState provisioningState); - } - - /** - * The stage of the ContactProfile definition allowing to specify minimumViableContactDuration. - */ - interface WithMinimumViableContactDuration { - /** - * Specifies the minimumViableContactDuration property: Minimum viable contact duration in ISO 8601 format. - * Used for listing the available contacts with a spacecraft at a given ground station.. - * - * @param minimumViableContactDuration Minimum viable contact duration in ISO 8601 format. Used for listing - * the available contacts with a spacecraft at a given ground station. - * @return the next definition stage. - */ - WithCreate withMinimumViableContactDuration(String minimumViableContactDuration); - } - - /** - * The stage of the ContactProfile definition allowing to specify minimumElevationDegrees. - */ - interface WithMinimumElevationDegrees { - /** - * Specifies the minimumElevationDegrees property: Minimum viable elevation for the contact in decimal - * degrees. Used for listing the available contacts with a spacecraft at a given ground station.. - * - * @param minimumElevationDegrees Minimum viable elevation for the contact in decimal degrees. Used for - * listing the available contacts with a spacecraft at a given ground station. - * @return the next definition stage. - */ - WithCreate withMinimumElevationDegrees(Float minimumElevationDegrees); - } - - /** - * The stage of the ContactProfile definition allowing to specify autoTrackingConfiguration. - */ - interface WithAutoTrackingConfiguration { - /** - * Specifies the autoTrackingConfiguration property: Auto-tracking configuration.. - * - * @param autoTrackingConfiguration Auto-tracking configuration. - * @return the next definition stage. - */ - WithCreate withAutoTrackingConfiguration(AutoTrackingConfiguration autoTrackingConfiguration); - } - - /** - * The stage of the ContactProfile definition allowing to specify eventHubUri. - */ - interface WithEventHubUri { - /** - * Specifies the eventHubUri property: ARM resource identifier of the Event Hub used for telemetry. Requires - * granting Orbital Resource Provider the rights to send telemetry into the hub.. - * - * @param eventHubUri ARM resource identifier of the Event Hub used for telemetry. Requires granting Orbital - * Resource Provider the rights to send telemetry into the hub. - * @return the next definition stage. - */ - WithCreate withEventHubUri(String eventHubUri); - } - - /** - * The stage of the ContactProfile definition allowing to specify thirdPartyConfigurations. - */ - interface WithThirdPartyConfigurations { - /** - * Specifies the thirdPartyConfigurations property: Third-party mission configuration of the Contact - * Profile. Describes RF links, modem processing, and IP endpoints.. - * - * @param thirdPartyConfigurations Third-party mission configuration of the Contact Profile. Describes RF - * links, modem processing, and IP endpoints. - * @return the next definition stage. - */ - WithCreate - withThirdPartyConfigurations(List thirdPartyConfigurations); - } - } - - /** - * Begins update for the ContactProfile resource. - * - * @return the stage of resource update. - */ - ContactProfile.Update update(); - - /** - * The template for ContactProfile update. - */ - interface Update extends UpdateStages.WithTags { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ContactProfile apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ContactProfile apply(Context context); - } - - /** - * The ContactProfile update stages. - */ - interface UpdateStages { - /** - * The stage of the ContactProfile update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ContactProfile refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ContactProfile refresh(Context context); -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfileLink.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfileLink.java deleted file mode 100644 index c07d5c6f6dc4..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfileLink.java +++ /dev/null @@ -1,263 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Contact Profile Link. - */ -@Fluent -public final class ContactProfileLink implements JsonSerializable { - /* - * Link name. - */ - private String name; - - /* - * Polarization. e.g. (RHCP, LHCP). - */ - private Polarization polarization; - - /* - * Direction (Uplink or Downlink). - */ - private Direction direction; - - /* - * Gain to noise temperature in db/K. It is the required G/T by the customer. Not used yet. - */ - private Float gainOverTemperature; - - /* - * Effective Isotropic Radiated Power (EIRP) in dBW. It is the required EIRP by the customer. Not used yet. - */ - private Float eirpdBW; - - /* - * Contact Profile Link Channel. - */ - private List channels; - - /** - * Creates an instance of ContactProfileLink class. - */ - public ContactProfileLink() { - } - - /** - * Get the name property: Link name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Link name. - * - * @param name the name value to set. - * @return the ContactProfileLink object itself. - */ - public ContactProfileLink withName(String name) { - this.name = name; - return this; - } - - /** - * Get the polarization property: Polarization. e.g. (RHCP, LHCP). - * - * @return the polarization value. - */ - public Polarization polarization() { - return this.polarization; - } - - /** - * Set the polarization property: Polarization. e.g. (RHCP, LHCP). - * - * @param polarization the polarization value to set. - * @return the ContactProfileLink object itself. - */ - public ContactProfileLink withPolarization(Polarization polarization) { - this.polarization = polarization; - return this; - } - - /** - * Get the direction property: Direction (Uplink or Downlink). - * - * @return the direction value. - */ - public Direction direction() { - return this.direction; - } - - /** - * Set the direction property: Direction (Uplink or Downlink). - * - * @param direction the direction value to set. - * @return the ContactProfileLink object itself. - */ - public ContactProfileLink withDirection(Direction direction) { - this.direction = direction; - return this; - } - - /** - * Get the gainOverTemperature property: Gain to noise temperature in db/K. It is the required G/T by the customer. - * Not used yet. - * - * @return the gainOverTemperature value. - */ - public Float gainOverTemperature() { - return this.gainOverTemperature; - } - - /** - * Set the gainOverTemperature property: Gain to noise temperature in db/K. It is the required G/T by the customer. - * Not used yet. - * - * @param gainOverTemperature the gainOverTemperature value to set. - * @return the ContactProfileLink object itself. - */ - public ContactProfileLink withGainOverTemperature(Float gainOverTemperature) { - this.gainOverTemperature = gainOverTemperature; - return this; - } - - /** - * Get the eirpdBW property: Effective Isotropic Radiated Power (EIRP) in dBW. It is the required EIRP by the - * customer. Not used yet. - * - * @return the eirpdBW value. - */ - public Float eirpdBW() { - return this.eirpdBW; - } - - /** - * Set the eirpdBW property: Effective Isotropic Radiated Power (EIRP) in dBW. It is the required EIRP by the - * customer. Not used yet. - * - * @param eirpdBW the eirpdBW value to set. - * @return the ContactProfileLink object itself. - */ - public ContactProfileLink withEirpdBW(Float eirpdBW) { - this.eirpdBW = eirpdBW; - return this; - } - - /** - * Get the channels property: Contact Profile Link Channel. - * - * @return the channels value. - */ - public List channels() { - return this.channels; - } - - /** - * Set the channels property: Contact Profile Link Channel. - * - * @param channels the channels value to set. - * @return the ContactProfileLink object itself. - */ - public ContactProfileLink withChannels(List channels) { - this.channels = channels; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property name in model ContactProfileLink")); - } - if (polarization() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property polarization in model ContactProfileLink")); - } - if (direction() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property direction in model ContactProfileLink")); - } - if (channels() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property channels in model ContactProfileLink")); - } else { - channels().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContactProfileLink.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("polarization", this.polarization == null ? null : this.polarization.toString()); - jsonWriter.writeStringField("direction", this.direction == null ? null : this.direction.toString()); - jsonWriter.writeArrayField("channels", this.channels, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeNumberField("gainOverTemperature", this.gainOverTemperature); - jsonWriter.writeNumberField("eirpdBW", this.eirpdBW); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContactProfileLink from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContactProfileLink if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ContactProfileLink. - */ - public static ContactProfileLink fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContactProfileLink deserializedContactProfileLink = new ContactProfileLink(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedContactProfileLink.name = reader.getString(); - } else if ("polarization".equals(fieldName)) { - deserializedContactProfileLink.polarization = Polarization.fromString(reader.getString()); - } else if ("direction".equals(fieldName)) { - deserializedContactProfileLink.direction = Direction.fromString(reader.getString()); - } else if ("channels".equals(fieldName)) { - List channels - = reader.readArray(reader1 -> ContactProfileLinkChannel.fromJson(reader1)); - deserializedContactProfileLink.channels = channels; - } else if ("gainOverTemperature".equals(fieldName)) { - deserializedContactProfileLink.gainOverTemperature = reader.getNullable(JsonReader::getFloat); - } else if ("eirpdBW".equals(fieldName)) { - deserializedContactProfileLink.eirpdBW = reader.getNullable(JsonReader::getFloat); - } else { - reader.skipChildren(); - } - } - - return deserializedContactProfileLink; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfileLinkChannel.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfileLinkChannel.java deleted file mode 100644 index f84aaae3389d..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfileLinkChannel.java +++ /dev/null @@ -1,315 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Contact Profile Link Channel. - */ -@Fluent -public final class ContactProfileLinkChannel implements JsonSerializable { - /* - * Channel name. - */ - private String name; - - /* - * Center Frequency in MHz. - */ - private float centerFrequencyMHz; - - /* - * Bandwidth in MHz. - */ - private float bandwidthMHz; - - /* - * Customer end point to store and retrieve data during a contact with the spacecraft. - */ - private EndPoint endPoint; - - /* - * Copy of the modem configuration file such as Kratos QRadio. Only valid for uplink directions. If provided, the - * modem connects to the customer endpoint and accepts commands from the customer instead of a VITA.49 stream. - */ - private String modulationConfiguration; - - /* - * Copy of the modem configuration file such as Kratos QRadio or Kratos QuantumRx. Only valid for downlink - * directions. If provided, the modem connects to the customer endpoint and sends demodulated data instead of a - * VITA.49 stream. - */ - private String demodulationConfiguration; - - /* - * Currently unused. - */ - private String encodingConfiguration; - - /* - * Currently unused. - */ - private String decodingConfiguration; - - /** - * Creates an instance of ContactProfileLinkChannel class. - */ - public ContactProfileLinkChannel() { - } - - /** - * Get the name property: Channel name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Channel name. - * - * @param name the name value to set. - * @return the ContactProfileLinkChannel object itself. - */ - public ContactProfileLinkChannel withName(String name) { - this.name = name; - return this; - } - - /** - * Get the centerFrequencyMHz property: Center Frequency in MHz. - * - * @return the centerFrequencyMHz value. - */ - public float centerFrequencyMHz() { - return this.centerFrequencyMHz; - } - - /** - * Set the centerFrequencyMHz property: Center Frequency in MHz. - * - * @param centerFrequencyMHz the centerFrequencyMHz value to set. - * @return the ContactProfileLinkChannel object itself. - */ - public ContactProfileLinkChannel withCenterFrequencyMHz(float centerFrequencyMHz) { - this.centerFrequencyMHz = centerFrequencyMHz; - return this; - } - - /** - * Get the bandwidthMHz property: Bandwidth in MHz. - * - * @return the bandwidthMHz value. - */ - public float bandwidthMHz() { - return this.bandwidthMHz; - } - - /** - * Set the bandwidthMHz property: Bandwidth in MHz. - * - * @param bandwidthMHz the bandwidthMHz value to set. - * @return the ContactProfileLinkChannel object itself. - */ - public ContactProfileLinkChannel withBandwidthMHz(float bandwidthMHz) { - this.bandwidthMHz = bandwidthMHz; - return this; - } - - /** - * Get the endPoint property: Customer end point to store and retrieve data during a contact with the spacecraft. - * - * @return the endPoint value. - */ - public EndPoint endPoint() { - return this.endPoint; - } - - /** - * Set the endPoint property: Customer end point to store and retrieve data during a contact with the spacecraft. - * - * @param endPoint the endPoint value to set. - * @return the ContactProfileLinkChannel object itself. - */ - public ContactProfileLinkChannel withEndPoint(EndPoint endPoint) { - this.endPoint = endPoint; - return this; - } - - /** - * Get the modulationConfiguration property: Copy of the modem configuration file such as Kratos QRadio. Only valid - * for uplink directions. If provided, the modem connects to the customer endpoint and accepts commands from the - * customer instead of a VITA.49 stream. - * - * @return the modulationConfiguration value. - */ - public String modulationConfiguration() { - return this.modulationConfiguration; - } - - /** - * Set the modulationConfiguration property: Copy of the modem configuration file such as Kratos QRadio. Only valid - * for uplink directions. If provided, the modem connects to the customer endpoint and accepts commands from the - * customer instead of a VITA.49 stream. - * - * @param modulationConfiguration the modulationConfiguration value to set. - * @return the ContactProfileLinkChannel object itself. - */ - public ContactProfileLinkChannel withModulationConfiguration(String modulationConfiguration) { - this.modulationConfiguration = modulationConfiguration; - return this; - } - - /** - * Get the demodulationConfiguration property: Copy of the modem configuration file such as Kratos QRadio or Kratos - * QuantumRx. Only valid for downlink directions. If provided, the modem connects to the customer endpoint and sends - * demodulated data instead of a VITA.49 stream. - * - * @return the demodulationConfiguration value. - */ - public String demodulationConfiguration() { - return this.demodulationConfiguration; - } - - /** - * Set the demodulationConfiguration property: Copy of the modem configuration file such as Kratos QRadio or Kratos - * QuantumRx. Only valid for downlink directions. If provided, the modem connects to the customer endpoint and sends - * demodulated data instead of a VITA.49 stream. - * - * @param demodulationConfiguration the demodulationConfiguration value to set. - * @return the ContactProfileLinkChannel object itself. - */ - public ContactProfileLinkChannel withDemodulationConfiguration(String demodulationConfiguration) { - this.demodulationConfiguration = demodulationConfiguration; - return this; - } - - /** - * Get the encodingConfiguration property: Currently unused. - * - * @return the encodingConfiguration value. - */ - public String encodingConfiguration() { - return this.encodingConfiguration; - } - - /** - * Set the encodingConfiguration property: Currently unused. - * - * @param encodingConfiguration the encodingConfiguration value to set. - * @return the ContactProfileLinkChannel object itself. - */ - public ContactProfileLinkChannel withEncodingConfiguration(String encodingConfiguration) { - this.encodingConfiguration = encodingConfiguration; - return this; - } - - /** - * Get the decodingConfiguration property: Currently unused. - * - * @return the decodingConfiguration value. - */ - public String decodingConfiguration() { - return this.decodingConfiguration; - } - - /** - * Set the decodingConfiguration property: Currently unused. - * - * @param decodingConfiguration the decodingConfiguration value to set. - * @return the ContactProfileLinkChannel object itself. - */ - public ContactProfileLinkChannel withDecodingConfiguration(String decodingConfiguration) { - this.decodingConfiguration = decodingConfiguration; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property name in model ContactProfileLinkChannel")); - } - if (endPoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property endPoint in model ContactProfileLinkChannel")); - } else { - endPoint().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContactProfileLinkChannel.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeFloatField("centerFrequencyMHz", this.centerFrequencyMHz); - jsonWriter.writeFloatField("bandwidthMHz", this.bandwidthMHz); - jsonWriter.writeJsonField("endPoint", this.endPoint); - jsonWriter.writeStringField("modulationConfiguration", this.modulationConfiguration); - jsonWriter.writeStringField("demodulationConfiguration", this.demodulationConfiguration); - jsonWriter.writeStringField("encodingConfiguration", this.encodingConfiguration); - jsonWriter.writeStringField("decodingConfiguration", this.decodingConfiguration); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContactProfileLinkChannel from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContactProfileLinkChannel if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ContactProfileLinkChannel. - */ - public static ContactProfileLinkChannel fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContactProfileLinkChannel deserializedContactProfileLinkChannel = new ContactProfileLinkChannel(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedContactProfileLinkChannel.name = reader.getString(); - } else if ("centerFrequencyMHz".equals(fieldName)) { - deserializedContactProfileLinkChannel.centerFrequencyMHz = reader.getFloat(); - } else if ("bandwidthMHz".equals(fieldName)) { - deserializedContactProfileLinkChannel.bandwidthMHz = reader.getFloat(); - } else if ("endPoint".equals(fieldName)) { - deserializedContactProfileLinkChannel.endPoint = EndPoint.fromJson(reader); - } else if ("modulationConfiguration".equals(fieldName)) { - deserializedContactProfileLinkChannel.modulationConfiguration = reader.getString(); - } else if ("demodulationConfiguration".equals(fieldName)) { - deserializedContactProfileLinkChannel.demodulationConfiguration = reader.getString(); - } else if ("encodingConfiguration".equals(fieldName)) { - deserializedContactProfileLinkChannel.encodingConfiguration = reader.getString(); - } else if ("decodingConfiguration".equals(fieldName)) { - deserializedContactProfileLinkChannel.decodingConfiguration = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedContactProfileLinkChannel; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfileListResult.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfileListResult.java deleted file mode 100644 index af4ae914bd72..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfileListResult.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.orbital.fluent.models.ContactProfileInner; -import java.io.IOException; -import java.util.List; - -/** - * Response for the ListContactProfiles API service call. - */ -@Fluent -public final class ContactProfileListResult implements JsonSerializable { - /* - * A list of contact profile resources in a resource group. - */ - private List value; - - /* - * The URL to get the next set of results. - */ - private String nextLink; - - /** - * Creates an instance of ContactProfileListResult class. - */ - public ContactProfileListResult() { - } - - /** - * Get the value property: A list of contact profile resources in a resource group. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: A list of contact profile resources in a resource group. - * - * @param value the value value to set. - * @return the ContactProfileListResult object itself. - */ - public ContactProfileListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URL to get the next set of results. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContactProfileListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContactProfileListResult if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ContactProfileListResult. - */ - public static ContactProfileListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContactProfileListResult deserializedContactProfileListResult = new ContactProfileListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ContactProfileInner.fromJson(reader1)); - deserializedContactProfileListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedContactProfileListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedContactProfileListResult; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfileThirdPartyConfiguration.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfileThirdPartyConfiguration.java deleted file mode 100644 index 14acc6fed411..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfileThirdPartyConfiguration.java +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Contact Profile third-party partner configuration. - */ -@Fluent -public final class ContactProfileThirdPartyConfiguration - implements JsonSerializable { - /* - * Name of the third-party provider. - */ - private String providerName; - - /* - * Name of string referencing the configuration describing contact set-up for a particular mission. Expected values - * are those which have been created in collaboration with the partner network. - */ - private String missionConfiguration; - - /** - * Creates an instance of ContactProfileThirdPartyConfiguration class. - */ - public ContactProfileThirdPartyConfiguration() { - } - - /** - * Get the providerName property: Name of the third-party provider. - * - * @return the providerName value. - */ - public String providerName() { - return this.providerName; - } - - /** - * Set the providerName property: Name of the third-party provider. - * - * @param providerName the providerName value to set. - * @return the ContactProfileThirdPartyConfiguration object itself. - */ - public ContactProfileThirdPartyConfiguration withProviderName(String providerName) { - this.providerName = providerName; - return this; - } - - /** - * Get the missionConfiguration property: Name of string referencing the configuration describing contact set-up for - * a particular mission. Expected values are those which have been created in collaboration with the partner - * network. - * - * @return the missionConfiguration value. - */ - public String missionConfiguration() { - return this.missionConfiguration; - } - - /** - * Set the missionConfiguration property: Name of string referencing the configuration describing contact set-up for - * a particular mission. Expected values are those which have been created in collaboration with the partner - * network. - * - * @param missionConfiguration the missionConfiguration value to set. - * @return the ContactProfileThirdPartyConfiguration object itself. - */ - public ContactProfileThirdPartyConfiguration withMissionConfiguration(String missionConfiguration) { - this.missionConfiguration = missionConfiguration; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (providerName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property providerName in model ContactProfileThirdPartyConfiguration")); - } - if (missionConfiguration() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property missionConfiguration in model ContactProfileThirdPartyConfiguration")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContactProfileThirdPartyConfiguration.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("providerName", this.providerName); - jsonWriter.writeStringField("missionConfiguration", this.missionConfiguration); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContactProfileThirdPartyConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContactProfileThirdPartyConfiguration if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ContactProfileThirdPartyConfiguration. - */ - public static ContactProfileThirdPartyConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContactProfileThirdPartyConfiguration deserializedContactProfileThirdPartyConfiguration - = new ContactProfileThirdPartyConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("providerName".equals(fieldName)) { - deserializedContactProfileThirdPartyConfiguration.providerName = reader.getString(); - } else if ("missionConfiguration".equals(fieldName)) { - deserializedContactProfileThirdPartyConfiguration.missionConfiguration = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedContactProfileThirdPartyConfiguration; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfiles.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfiles.java deleted file mode 100644 index 37c0c8979275..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfiles.java +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of ContactProfiles. - */ -public interface ContactProfiles { - /** - * Gets the specified contact Profile in a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified contact Profile in a specified resource group along with {@link Response}. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String contactProfileName, - Context context); - - /** - * Gets the specified contact Profile in a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified contact Profile in a specified resource group. - */ - ContactProfile getByResourceGroup(String resourceGroupName, String contactProfileName); - - /** - * Deletes a specified contact profile resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByResourceGroup(String resourceGroupName, String contactProfileName); - - /** - * Deletes a specified contact profile resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String contactProfileName, Context context); - - /** - * Returns list of contact profiles by Subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call as paginated response with {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * Returns list of contact profiles by Subscription. - * - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String skiptoken, Context context); - - /** - * Returns list of contact profiles by Resource Group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Returns list of contact profiles by Resource Group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, String skiptoken, Context context); - - /** - * Gets the specified contact Profile in a specified resource group. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified contact Profile in a specified resource group along with {@link Response}. - */ - ContactProfile getById(String id); - - /** - * Gets the specified contact Profile in a specified resource group. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified contact Profile in a specified resource group along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a specified contact profile resource. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Deletes a specified contact profile resource. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ContactProfile resource. - * - * @param name resource name. - * @return the first stage of the new ContactProfile definition. - */ - ContactProfile.DefinitionStages.Blank define(String name); -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfilesProperties.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfilesProperties.java deleted file mode 100644 index 2267f9abe017..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfilesProperties.java +++ /dev/null @@ -1,336 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * List of Contact Profile Resource Properties. - */ -@Fluent -public class ContactProfilesProperties implements JsonSerializable { - /* - * The current state of the resource's creation, deletion, or modification. - */ - private ContactProfilesPropertiesProvisioningState provisioningState; - - /* - * Minimum viable contact duration in ISO 8601 format. Used for listing the available contacts with a spacecraft at - * a given ground station. - */ - private String minimumViableContactDuration; - - /* - * Minimum viable elevation for the contact in decimal degrees. Used for listing the available contacts with a - * spacecraft at a given ground station. - */ - private Float minimumElevationDegrees; - - /* - * Auto-tracking configuration. - */ - private AutoTrackingConfiguration autoTrackingConfiguration; - - /* - * ARM resource identifier of the Event Hub used for telemetry. Requires granting Orbital Resource Provider the - * rights to send telemetry into the hub. - */ - private String eventHubUri; - - /* - * Network configuration of customer virtual network. - */ - private ContactProfilesPropertiesNetworkConfiguration networkConfiguration; - - /* - * Third-party mission configuration of the Contact Profile. Describes RF links, modem processing, and IP endpoints. - */ - private List thirdPartyConfigurations; - - /* - * Links of the Contact Profile. Describes RF links, modem processing, and IP endpoints. - */ - private List links; - - /** - * Creates an instance of ContactProfilesProperties class. - */ - public ContactProfilesProperties() { - } - - /** - * Get the provisioningState property: The current state of the resource's creation, deletion, or modification. - * - * @return the provisioningState value. - */ - public ContactProfilesPropertiesProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState property: The current state of the resource's creation, deletion, or modification. - * - * @param provisioningState the provisioningState value to set. - * @return the ContactProfilesProperties object itself. - */ - public ContactProfilesProperties - withProvisioningState(ContactProfilesPropertiesProvisioningState provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the minimumViableContactDuration property: Minimum viable contact duration in ISO 8601 format. Used for - * listing the available contacts with a spacecraft at a given ground station. - * - * @return the minimumViableContactDuration value. - */ - public String minimumViableContactDuration() { - return this.minimumViableContactDuration; - } - - /** - * Set the minimumViableContactDuration property: Minimum viable contact duration in ISO 8601 format. Used for - * listing the available contacts with a spacecraft at a given ground station. - * - * @param minimumViableContactDuration the minimumViableContactDuration value to set. - * @return the ContactProfilesProperties object itself. - */ - public ContactProfilesProperties withMinimumViableContactDuration(String minimumViableContactDuration) { - this.minimumViableContactDuration = minimumViableContactDuration; - return this; - } - - /** - * Get the minimumElevationDegrees property: Minimum viable elevation for the contact in decimal degrees. Used for - * listing the available contacts with a spacecraft at a given ground station. - * - * @return the minimumElevationDegrees value. - */ - public Float minimumElevationDegrees() { - return this.minimumElevationDegrees; - } - - /** - * Set the minimumElevationDegrees property: Minimum viable elevation for the contact in decimal degrees. Used for - * listing the available contacts with a spacecraft at a given ground station. - * - * @param minimumElevationDegrees the minimumElevationDegrees value to set. - * @return the ContactProfilesProperties object itself. - */ - public ContactProfilesProperties withMinimumElevationDegrees(Float minimumElevationDegrees) { - this.minimumElevationDegrees = minimumElevationDegrees; - return this; - } - - /** - * Get the autoTrackingConfiguration property: Auto-tracking configuration. - * - * @return the autoTrackingConfiguration value. - */ - public AutoTrackingConfiguration autoTrackingConfiguration() { - return this.autoTrackingConfiguration; - } - - /** - * Set the autoTrackingConfiguration property: Auto-tracking configuration. - * - * @param autoTrackingConfiguration the autoTrackingConfiguration value to set. - * @return the ContactProfilesProperties object itself. - */ - public ContactProfilesProperties - withAutoTrackingConfiguration(AutoTrackingConfiguration autoTrackingConfiguration) { - this.autoTrackingConfiguration = autoTrackingConfiguration; - return this; - } - - /** - * Get the eventHubUri property: ARM resource identifier of the Event Hub used for telemetry. Requires granting - * Orbital Resource Provider the rights to send telemetry into the hub. - * - * @return the eventHubUri value. - */ - public String eventHubUri() { - return this.eventHubUri; - } - - /** - * Set the eventHubUri property: ARM resource identifier of the Event Hub used for telemetry. Requires granting - * Orbital Resource Provider the rights to send telemetry into the hub. - * - * @param eventHubUri the eventHubUri value to set. - * @return the ContactProfilesProperties object itself. - */ - public ContactProfilesProperties withEventHubUri(String eventHubUri) { - this.eventHubUri = eventHubUri; - return this; - } - - /** - * Get the networkConfiguration property: Network configuration of customer virtual network. - * - * @return the networkConfiguration value. - */ - public ContactProfilesPropertiesNetworkConfiguration networkConfiguration() { - return this.networkConfiguration; - } - - /** - * Set the networkConfiguration property: Network configuration of customer virtual network. - * - * @param networkConfiguration the networkConfiguration value to set. - * @return the ContactProfilesProperties object itself. - */ - public ContactProfilesProperties - withNetworkConfiguration(ContactProfilesPropertiesNetworkConfiguration networkConfiguration) { - this.networkConfiguration = networkConfiguration; - return this; - } - - /** - * Get the thirdPartyConfigurations property: Third-party mission configuration of the Contact Profile. Describes RF - * links, modem processing, and IP endpoints. - * - * @return the thirdPartyConfigurations value. - */ - public List thirdPartyConfigurations() { - return this.thirdPartyConfigurations; - } - - /** - * Set the thirdPartyConfigurations property: Third-party mission configuration of the Contact Profile. Describes RF - * links, modem processing, and IP endpoints. - * - * @param thirdPartyConfigurations the thirdPartyConfigurations value to set. - * @return the ContactProfilesProperties object itself. - */ - public ContactProfilesProperties - withThirdPartyConfigurations(List thirdPartyConfigurations) { - this.thirdPartyConfigurations = thirdPartyConfigurations; - return this; - } - - /** - * Get the links property: Links of the Contact Profile. Describes RF links, modem processing, and IP endpoints. - * - * @return the links value. - */ - public List links() { - return this.links; - } - - /** - * Set the links property: Links of the Contact Profile. Describes RF links, modem processing, and IP endpoints. - * - * @param links the links value to set. - * @return the ContactProfilesProperties object itself. - */ - public ContactProfilesProperties withLinks(List links) { - this.links = links; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (networkConfiguration() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property networkConfiguration in model ContactProfilesProperties")); - } else { - networkConfiguration().validate(); - } - if (thirdPartyConfigurations() != null) { - thirdPartyConfigurations().forEach(e -> e.validate()); - } - if (links() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property links in model ContactProfilesProperties")); - } else { - links().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContactProfilesProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("networkConfiguration", this.networkConfiguration); - jsonWriter.writeArrayField("links", this.links, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("provisioningState", - this.provisioningState == null ? null : this.provisioningState.toString()); - jsonWriter.writeStringField("minimumViableContactDuration", this.minimumViableContactDuration); - jsonWriter.writeNumberField("minimumElevationDegrees", this.minimumElevationDegrees); - jsonWriter.writeStringField("autoTrackingConfiguration", - this.autoTrackingConfiguration == null ? null : this.autoTrackingConfiguration.toString()); - jsonWriter.writeStringField("eventHubUri", this.eventHubUri); - jsonWriter.writeArrayField("thirdPartyConfigurations", this.thirdPartyConfigurations, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContactProfilesProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContactProfilesProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ContactProfilesProperties. - */ - public static ContactProfilesProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContactProfilesProperties deserializedContactProfilesProperties = new ContactProfilesProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("networkConfiguration".equals(fieldName)) { - deserializedContactProfilesProperties.networkConfiguration - = ContactProfilesPropertiesNetworkConfiguration.fromJson(reader); - } else if ("links".equals(fieldName)) { - List links = reader.readArray(reader1 -> ContactProfileLink.fromJson(reader1)); - deserializedContactProfilesProperties.links = links; - } else if ("provisioningState".equals(fieldName)) { - deserializedContactProfilesProperties.provisioningState - = ContactProfilesPropertiesProvisioningState.fromString(reader.getString()); - } else if ("minimumViableContactDuration".equals(fieldName)) { - deserializedContactProfilesProperties.minimumViableContactDuration = reader.getString(); - } else if ("minimumElevationDegrees".equals(fieldName)) { - deserializedContactProfilesProperties.minimumElevationDegrees - = reader.getNullable(JsonReader::getFloat); - } else if ("autoTrackingConfiguration".equals(fieldName)) { - deserializedContactProfilesProperties.autoTrackingConfiguration - = AutoTrackingConfiguration.fromString(reader.getString()); - } else if ("eventHubUri".equals(fieldName)) { - deserializedContactProfilesProperties.eventHubUri = reader.getString(); - } else if ("thirdPartyConfigurations".equals(fieldName)) { - List thirdPartyConfigurations - = reader.readArray(reader1 -> ContactProfileThirdPartyConfiguration.fromJson(reader1)); - deserializedContactProfilesProperties.thirdPartyConfigurations = thirdPartyConfigurations; - } else { - reader.skipChildren(); - } - } - - return deserializedContactProfilesProperties; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfilesPropertiesNetworkConfiguration.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfilesPropertiesNetworkConfiguration.java deleted file mode 100644 index cd1424bf6dc5..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfilesPropertiesNetworkConfiguration.java +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Network configuration of customer virtual network. - */ -@Fluent -public final class ContactProfilesPropertiesNetworkConfiguration - implements JsonSerializable { - /* - * ARM resource identifier of the subnet delegated to the Microsoft.Orbital/orbitalGateways. Needs to be at least a - * class C subnet, and should not have any IP created in it. - */ - private String subnetId; - - /** - * Creates an instance of ContactProfilesPropertiesNetworkConfiguration class. - */ - public ContactProfilesPropertiesNetworkConfiguration() { - } - - /** - * Get the subnetId property: ARM resource identifier of the subnet delegated to the - * Microsoft.Orbital/orbitalGateways. Needs to be at least a class C subnet, and should not have any IP created in - * it. - * - * @return the subnetId value. - */ - public String subnetId() { - return this.subnetId; - } - - /** - * Set the subnetId property: ARM resource identifier of the subnet delegated to the - * Microsoft.Orbital/orbitalGateways. Needs to be at least a class C subnet, and should not have any IP created in - * it. - * - * @param subnetId the subnetId value to set. - * @return the ContactProfilesPropertiesNetworkConfiguration object itself. - */ - public ContactProfilesPropertiesNetworkConfiguration withSubnetId(String subnetId) { - this.subnetId = subnetId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (subnetId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property subnetId in model ContactProfilesPropertiesNetworkConfiguration")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContactProfilesPropertiesNetworkConfiguration.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("subnetId", this.subnetId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContactProfilesPropertiesNetworkConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContactProfilesPropertiesNetworkConfiguration if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ContactProfilesPropertiesNetworkConfiguration. - */ - public static ContactProfilesPropertiesNetworkConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContactProfilesPropertiesNetworkConfiguration deserializedContactProfilesPropertiesNetworkConfiguration - = new ContactProfilesPropertiesNetworkConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("subnetId".equals(fieldName)) { - deserializedContactProfilesPropertiesNetworkConfiguration.subnetId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedContactProfilesPropertiesNetworkConfiguration; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfilesPropertiesProvisioningState.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfilesPropertiesProvisioningState.java deleted file mode 100644 index 6442f455fb50..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfilesPropertiesProvisioningState.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The current state of the resource's creation, deletion, or modification. - */ -public final class ContactProfilesPropertiesProvisioningState - extends ExpandableStringEnum { - /** - * Static value creating for ContactProfilesPropertiesProvisioningState. - */ - public static final ContactProfilesPropertiesProvisioningState CREATING = fromString("creating"); - - /** - * Static value succeeded for ContactProfilesPropertiesProvisioningState. - */ - public static final ContactProfilesPropertiesProvisioningState SUCCEEDED = fromString("succeeded"); - - /** - * Static value failed for ContactProfilesPropertiesProvisioningState. - */ - public static final ContactProfilesPropertiesProvisioningState FAILED = fromString("failed"); - - /** - * Static value canceled for ContactProfilesPropertiesProvisioningState. - */ - public static final ContactProfilesPropertiesProvisioningState CANCELED = fromString("canceled"); - - /** - * Static value updating for ContactProfilesPropertiesProvisioningState. - */ - public static final ContactProfilesPropertiesProvisioningState UPDATING = fromString("updating"); - - /** - * Static value deleting for ContactProfilesPropertiesProvisioningState. - */ - public static final ContactProfilesPropertiesProvisioningState DELETING = fromString("deleting"); - - /** - * Creates a new instance of ContactProfilesPropertiesProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ContactProfilesPropertiesProvisioningState() { - } - - /** - * Creates or finds a ContactProfilesPropertiesProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ContactProfilesPropertiesProvisioningState. - */ - public static ContactProfilesPropertiesProvisioningState fromString(String name) { - return fromString(name, ContactProfilesPropertiesProvisioningState.class); - } - - /** - * Gets known ContactProfilesPropertiesProvisioningState values. - * - * @return known ContactProfilesPropertiesProvisioningState values. - */ - public static Collection values() { - return values(ContactProfilesPropertiesProvisioningState.class); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Contacts.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Contacts.java deleted file mode 100644 index 17c3c42a57a0..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Contacts.java +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of Contacts. - */ -public interface Contacts { - /** - * Returns list of contacts by spacecraftName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContacts API service call as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String spacecraftName); - - /** - * Returns list of contacts by spacecraftName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContacts API service call as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String spacecraftName, String skiptoken, Context context); - - /** - * Gets the specified contact in a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified contact in a specified resource group along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String spacecraftName, String contactName, - Context context); - - /** - * Gets the specified contact in a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified contact in a specified resource group. - */ - Contact get(String resourceGroupName, String spacecraftName, String contactName); - - /** - * Deletes a specified contact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String spacecraftName, String contactName); - - /** - * Deletes a specified contact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param contactName Contact name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String spacecraftName, String contactName, Context context); - - /** - * Gets the specified contact in a specified resource group. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified contact in a specified resource group along with {@link Response}. - */ - Contact getById(String id); - - /** - * Gets the specified contact in a specified resource group. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified contact in a specified resource group along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a specified contact. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Deletes a specified contact. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Contact resource. - * - * @param name resource name. - * @return the first stage of the new Contact definition. - */ - Contact.DefinitionStages.Blank define(String name); -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactsPropertiesAntennaConfiguration.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactsPropertiesAntennaConfiguration.java deleted file mode 100644 index 9b89298def75..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactsPropertiesAntennaConfiguration.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The configuration associated with the allocated antenna. - */ -@Fluent -public final class ContactsPropertiesAntennaConfiguration - implements JsonSerializable { - /* - * The destination IP a packet can be sent to. This would for example be the TCP endpoint you would send data to. - */ - private String destinationIp; - - /* - * List of Source IP - */ - private List sourceIps; - - /** - * Creates an instance of ContactsPropertiesAntennaConfiguration class. - */ - public ContactsPropertiesAntennaConfiguration() { - } - - /** - * Get the destinationIp property: The destination IP a packet can be sent to. This would for example be the TCP - * endpoint you would send data to. - * - * @return the destinationIp value. - */ - public String destinationIp() { - return this.destinationIp; - } - - /** - * Set the destinationIp property: The destination IP a packet can be sent to. This would for example be the TCP - * endpoint you would send data to. - * - * @param destinationIp the destinationIp value to set. - * @return the ContactsPropertiesAntennaConfiguration object itself. - */ - public ContactsPropertiesAntennaConfiguration withDestinationIp(String destinationIp) { - this.destinationIp = destinationIp; - return this; - } - - /** - * Get the sourceIps property: List of Source IP. - * - * @return the sourceIps value. - */ - public List sourceIps() { - return this.sourceIps; - } - - /** - * Set the sourceIps property: List of Source IP. - * - * @param sourceIps the sourceIps value to set. - * @return the ContactsPropertiesAntennaConfiguration object itself. - */ - public ContactsPropertiesAntennaConfiguration withSourceIps(List sourceIps) { - this.sourceIps = sourceIps; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("destinationIp", this.destinationIp); - jsonWriter.writeArrayField("sourceIps", this.sourceIps, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContactsPropertiesAntennaConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContactsPropertiesAntennaConfiguration if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ContactsPropertiesAntennaConfiguration. - */ - public static ContactsPropertiesAntennaConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContactsPropertiesAntennaConfiguration deserializedContactsPropertiesAntennaConfiguration - = new ContactsPropertiesAntennaConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("destinationIp".equals(fieldName)) { - deserializedContactsPropertiesAntennaConfiguration.destinationIp = reader.getString(); - } else if ("sourceIps".equals(fieldName)) { - List sourceIps = reader.readArray(reader1 -> reader1.getString()); - deserializedContactsPropertiesAntennaConfiguration.sourceIps = sourceIps; - } else { - reader.skipChildren(); - } - } - - return deserializedContactsPropertiesAntennaConfiguration; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactsPropertiesContactProfile.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactsPropertiesContactProfile.java deleted file mode 100644 index 4acc62438e49..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactsPropertiesContactProfile.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The reference to the contact profile resource. - */ -@Fluent -public final class ContactsPropertiesContactProfile extends ResourceReference { - /** - * Creates an instance of ContactsPropertiesContactProfile class. - */ - public ContactsPropertiesContactProfile() { - } - - /** - * {@inheritDoc} - */ - @Override - public ContactsPropertiesContactProfile withId(String id) { - super.withId(id); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (id() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property id in model ContactsPropertiesContactProfile")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContactsPropertiesContactProfile.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", id()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContactsPropertiesContactProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContactsPropertiesContactProfile if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ContactsPropertiesContactProfile. - */ - public static ContactsPropertiesContactProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContactsPropertiesContactProfile deserializedContactsPropertiesContactProfile - = new ContactsPropertiesContactProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedContactsPropertiesContactProfile.withId(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedContactsPropertiesContactProfile; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactsPropertiesProvisioningState.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactsPropertiesProvisioningState.java deleted file mode 100644 index 0d12c446336c..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactsPropertiesProvisioningState.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The current state of the resource's creation, deletion, or modification. - */ -public final class ContactsPropertiesProvisioningState - extends ExpandableStringEnum { - /** - * Static value creating for ContactsPropertiesProvisioningState. - */ - public static final ContactsPropertiesProvisioningState CREATING = fromString("creating"); - - /** - * Static value succeeded for ContactsPropertiesProvisioningState. - */ - public static final ContactsPropertiesProvisioningState SUCCEEDED = fromString("succeeded"); - - /** - * Static value failed for ContactsPropertiesProvisioningState. - */ - public static final ContactsPropertiesProvisioningState FAILED = fromString("failed"); - - /** - * Static value canceled for ContactsPropertiesProvisioningState. - */ - public static final ContactsPropertiesProvisioningState CANCELED = fromString("canceled"); - - /** - * Static value updating for ContactsPropertiesProvisioningState. - */ - public static final ContactsPropertiesProvisioningState UPDATING = fromString("updating"); - - /** - * Static value deleting for ContactsPropertiesProvisioningState. - */ - public static final ContactsPropertiesProvisioningState DELETING = fromString("deleting"); - - /** - * Creates a new instance of ContactsPropertiesProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ContactsPropertiesProvisioningState() { - } - - /** - * Creates or finds a ContactsPropertiesProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ContactsPropertiesProvisioningState. - */ - public static ContactsPropertiesProvisioningState fromString(String name) { - return fromString(name, ContactsPropertiesProvisioningState.class); - } - - /** - * Gets known ContactsPropertiesProvisioningState values. - * - * @return known ContactsPropertiesProvisioningState values. - */ - public static Collection values() { - return values(ContactsPropertiesProvisioningState.class); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactsStatus.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactsStatus.java deleted file mode 100644 index 8d920652540f..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactsStatus.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Status of a contact. - */ -public final class ContactsStatus extends ExpandableStringEnum { - /** - * Static value scheduled for ContactsStatus. - */ - public static final ContactsStatus SCHEDULED = fromString("scheduled"); - - /** - * Static value cancelled for ContactsStatus. - */ - public static final ContactsStatus CANCELLED = fromString("cancelled"); - - /** - * Static value succeeded for ContactsStatus. - */ - public static final ContactsStatus SUCCEEDED = fromString("succeeded"); - - /** - * Static value failed for ContactsStatus. - */ - public static final ContactsStatus FAILED = fromString("failed"); - - /** - * Static value providerCancelled for ContactsStatus. - */ - public static final ContactsStatus PROVIDER_CANCELLED = fromString("providerCancelled"); - - /** - * Creates a new instance of ContactsStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ContactsStatus() { - } - - /** - * Creates or finds a ContactsStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding ContactsStatus. - */ - public static ContactsStatus fromString(String name) { - return fromString(name, ContactsStatus.class); - } - - /** - * Gets known ContactsStatus values. - * - * @return known ContactsStatus values. - */ - public static Collection values() { - return values(ContactsStatus.class); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Direction.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Direction.java deleted file mode 100644 index 529f66e0595e..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Direction.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Direction (Uplink or Downlink). - */ -public final class Direction extends ExpandableStringEnum { - /** - * Static value Uplink for Direction. - */ - public static final Direction UPLINK = fromString("Uplink"); - - /** - * Static value Downlink for Direction. - */ - public static final Direction DOWNLINK = fromString("Downlink"); - - /** - * Creates a new instance of Direction value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Direction() { - } - - /** - * Creates or finds a Direction from its string representation. - * - * @param name a name to look for. - * @return the corresponding Direction. - */ - public static Direction fromString(String name) { - return fromString(name, Direction.class); - } - - /** - * Gets known Direction values. - * - * @return known Direction values. - */ - public static Collection values() { - return values(Direction.class); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/EndPoint.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/EndPoint.java deleted file mode 100644 index 00c840702b86..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/EndPoint.java +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Customer end point to store and retrieve data during a contact with the spacecraft. - */ -@Fluent -public final class EndPoint implements JsonSerializable { - /* - * IP Address (IPv4). - */ - private String ipAddress; - - /* - * Name of an end point. - */ - private String endPointName; - - /* - * TCP port to listen on to receive data. - */ - private String port; - - /* - * Protocol either UDP or TCP. - */ - private Protocol protocol; - - /** - * Creates an instance of EndPoint class. - */ - public EndPoint() { - } - - /** - * Get the ipAddress property: IP Address (IPv4). - * - * @return the ipAddress value. - */ - public String ipAddress() { - return this.ipAddress; - } - - /** - * Set the ipAddress property: IP Address (IPv4). - * - * @param ipAddress the ipAddress value to set. - * @return the EndPoint object itself. - */ - public EndPoint withIpAddress(String ipAddress) { - this.ipAddress = ipAddress; - return this; - } - - /** - * Get the endPointName property: Name of an end point. - * - * @return the endPointName value. - */ - public String endPointName() { - return this.endPointName; - } - - /** - * Set the endPointName property: Name of an end point. - * - * @param endPointName the endPointName value to set. - * @return the EndPoint object itself. - */ - public EndPoint withEndPointName(String endPointName) { - this.endPointName = endPointName; - return this; - } - - /** - * Get the port property: TCP port to listen on to receive data. - * - * @return the port value. - */ - public String port() { - return this.port; - } - - /** - * Set the port property: TCP port to listen on to receive data. - * - * @param port the port value to set. - * @return the EndPoint object itself. - */ - public EndPoint withPort(String port) { - this.port = port; - return this; - } - - /** - * Get the protocol property: Protocol either UDP or TCP. - * - * @return the protocol value. - */ - public Protocol protocol() { - return this.protocol; - } - - /** - * Set the protocol property: Protocol either UDP or TCP. - * - * @param protocol the protocol value to set. - * @return the EndPoint object itself. - */ - public EndPoint withProtocol(Protocol protocol) { - this.protocol = protocol; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (ipAddress() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property ipAddress in model EndPoint")); - } - if (endPointName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property endPointName in model EndPoint")); - } - if (port() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property port in model EndPoint")); - } - if (protocol() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property protocol in model EndPoint")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EndPoint.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("ipAddress", this.ipAddress); - jsonWriter.writeStringField("endPointName", this.endPointName); - jsonWriter.writeStringField("port", this.port); - jsonWriter.writeStringField("protocol", this.protocol == null ? null : this.protocol.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EndPoint from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EndPoint if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EndPoint. - */ - public static EndPoint fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EndPoint deserializedEndPoint = new EndPoint(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("ipAddress".equals(fieldName)) { - deserializedEndPoint.ipAddress = reader.getString(); - } else if ("endPointName".equals(fieldName)) { - deserializedEndPoint.endPointName = reader.getString(); - } else if ("port".equals(fieldName)) { - deserializedEndPoint.port = reader.getString(); - } else if ("protocol".equals(fieldName)) { - deserializedEndPoint.protocol = Protocol.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedEndPoint; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Operation.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Operation.java deleted file mode 100644 index 1c68104f0be6..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Operation.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.resourcemanager.orbital.fluent.models.OperationInner; - -/** - * An immutable client-side representation of Operation. - */ -public interface Operation { - /** - * Gets the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * - * @return the name value. - */ - String name(); - - /** - * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for ARM/control-plane operations. - * - * @return the isDataAction value. - */ - Boolean isDataAction(); - - /** - * Gets the display property: Localized display information for this particular operation. - * - * @return the display value. - */ - OperationDisplay display(); - - /** - * Gets the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and - * audit logs UX. Default value is "user,system". - * - * @return the origin value. - */ - Origin origin(); - - /** - * Gets the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal - * only APIs. - * - * @return the actionType value. - */ - ActionType actionType(); - - /** - * Gets the inner com.azure.resourcemanager.orbital.fluent.models.OperationInner object. - * - * @return the inner object. - */ - OperationInner innerModel(); -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/OperationDisplay.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/OperationDisplay.java deleted file mode 100644 index 921b65d4410f..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/OperationDisplay.java +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Localized display information for this particular operation. - */ -@Immutable -public final class OperationDisplay implements JsonSerializable { - /* - * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or - * "Microsoft Compute". - */ - private String provider; - - /* - * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or - * "Job Schedule Collections". - */ - private String resource; - - /* - * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. - * "Create or Update Virtual Machine", "Restart Virtual Machine". - */ - private String operation; - - /* - * The short, localized friendly description of the operation; suitable for tool tips and detailed views. - */ - private String description; - - /** - * Creates an instance of OperationDisplay class. - */ - public OperationDisplay() { - } - - /** - * Get the provider property: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring - * Insights" or "Microsoft Compute". - * - * @return the provider value. - */ - public String provider() { - return this.provider; - } - - /** - * Get the resource property: The localized friendly name of the resource type related to this operation. E.g. - * "Virtual Machines" or "Job Schedule Collections". - * - * @return the resource value. - */ - public String resource() { - return this.resource; - } - - /** - * Get the operation property: The concise, localized friendly name for the operation; suitable for dropdowns. E.g. - * "Create or Update Virtual Machine", "Restart Virtual Machine". - * - * @return the operation value. - */ - public String operation() { - return this.operation; - } - - /** - * Get the description property: The short, localized friendly description of the operation; suitable for tool tips - * and detailed views. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationDisplay from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationDisplay if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationDisplay. - */ - public static OperationDisplay fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationDisplay deserializedOperationDisplay = new OperationDisplay(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provider".equals(fieldName)) { - deserializedOperationDisplay.provider = reader.getString(); - } else if ("resource".equals(fieldName)) { - deserializedOperationDisplay.resource = reader.getString(); - } else if ("operation".equals(fieldName)) { - deserializedOperationDisplay.operation = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedOperationDisplay.description = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationDisplay; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/OperationListResult.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/OperationListResult.java deleted file mode 100644 index a4734726ff74..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/OperationListResult.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.orbital.fluent.models.OperationInner; -import java.io.IOException; -import java.util.List; - -/** - * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of - * results. - */ -@Immutable -public final class OperationListResult implements JsonSerializable { - /* - * List of operations supported by the resource provider - */ - private List value; - - /* - * URL to get the next set of operation list results (if there are any). - */ - private String nextLink; - - /** - * Creates an instance of OperationListResult class. - */ - public OperationListResult() { - } - - /** - * Get the value property: List of operations supported by the resource provider. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next set of operation list results (if there are any). - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationListResult if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationListResult. - */ - public static OperationListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationListResult deserializedOperationListResult = new OperationListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> OperationInner.fromJson(reader1)); - deserializedOperationListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedOperationListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationListResult; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/OperationResult.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/OperationResult.java deleted file mode 100644 index 3da6a8fc0df1..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/OperationResult.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.resourcemanager.orbital.fluent.models.OperationResultInner; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * An immutable client-side representation of OperationResult. - */ -public interface OperationResult { - /** - * Gets the id property: ID of the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: Name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the status property: The status of operation. - * - * @return the status value. - */ - Status status(); - - /** - * Gets the startTime property: The operation start time (ISO 8601 UTC standard). - * - * @return the startTime value. - */ - OffsetDateTime startTime(); - - /** - * Gets the endTime property: The operation end time (ISO 8601 UTC standard). - * - * @return the endTime value. - */ - OffsetDateTime endTime(); - - /** - * Gets the percentComplete property: Percentage completed. - * - * @return the percentComplete value. - */ - Double percentComplete(); - - /** - * Gets the value property: A list of results when the operation returns multiple results. - * - * @return the value value. - */ - List value(); - - /** - * Gets the nextLink property: The URL to get the next set of results. - * - * @return the nextLink value. - */ - String nextLink(); - - /** - * Gets the properties property: Operation result properties. - * - * @return the properties value. - */ - Object properties(); - - /** - * Gets the error property: Operation result error properties. - * - * @return the error value. - */ - OperationResultErrorProperties error(); - - /** - * Gets the inner com.azure.resourcemanager.orbital.fluent.models.OperationResultInner object. - * - * @return the inner object. - */ - OperationResultInner innerModel(); -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/OperationResultErrorProperties.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/OperationResultErrorProperties.java deleted file mode 100644 index e10ba0e83f51..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/OperationResultErrorProperties.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Operation result error properties. - */ -@Immutable -public final class OperationResultErrorProperties implements JsonSerializable { - /* - * The code of the error. - */ - private String code; - - /* - * The error message. - */ - private String message; - - /** - * Creates an instance of OperationResultErrorProperties class. - */ - public OperationResultErrorProperties() { - } - - /** - * Get the code property: The code of the error. - * - * @return the code value. - */ - public String code() { - return this.code; - } - - /** - * Get the message property: The error message. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationResultErrorProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationResultErrorProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationResultErrorProperties. - */ - public static OperationResultErrorProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationResultErrorProperties deserializedOperationResultErrorProperties - = new OperationResultErrorProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("code".equals(fieldName)) { - deserializedOperationResultErrorProperties.code = reader.getString(); - } else if ("message".equals(fieldName)) { - deserializedOperationResultErrorProperties.message = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationResultErrorProperties; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Operations.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Operations.java deleted file mode 100644 index 2438da5b7068..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Operations.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** - * Resource collection API of Operations. - */ -public interface Operations { - /** - * Lists all of the available Orbital Rest API operations. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * Lists all of the available Orbital Rest API operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(Context context); -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/OperationsResults.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/OperationsResults.java deleted file mode 100644 index 6e9a8ff67d25..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/OperationsResults.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.util.Context; - -/** - * Resource collection API of OperationsResults. - */ -public interface OperationsResults { - /** - * Returns operation results. - * - * @param location The name of Azure region. - * @param operationId The ID of an ongoing async operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation Result Entity. - */ - OperationResult get(String location, String operationId); - - /** - * Returns operation results. - * - * @param location The name of Azure region. - * @param operationId The ID of an ongoing async operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation Result Entity. - */ - OperationResult get(String location, String operationId, Context context); -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Origin.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Origin.java deleted file mode 100644 index 2e68d9209782..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Origin.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value - * is "user,system". - */ -public final class Origin extends ExpandableStringEnum { - /** - * Static value user for Origin. - */ - public static final Origin USER = fromString("user"); - - /** - * Static value system for Origin. - */ - public static final Origin SYSTEM = fromString("system"); - - /** - * Static value user,system for Origin. - */ - public static final Origin USER_SYSTEM = fromString("user,system"); - - /** - * Creates a new instance of Origin value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Origin() { - } - - /** - * Creates or finds a Origin from its string representation. - * - * @param name a name to look for. - * @return the corresponding Origin. - */ - public static Origin fromString(String name) { - return fromString(name, Origin.class); - } - - /** - * Gets known Origin values. - * - * @return known Origin values. - */ - public static Collection values() { - return values(Origin.class); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Polarization.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Polarization.java deleted file mode 100644 index f133af228d8a..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Polarization.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Polarization. e.g. (RHCP, LHCP). - */ -public final class Polarization extends ExpandableStringEnum { - /** - * Static value RHCP for Polarization. - */ - public static final Polarization RHCP = fromString("RHCP"); - - /** - * Static value LHCP for Polarization. - */ - public static final Polarization LHCP = fromString("LHCP"); - - /** - * Static value linearVertical for Polarization. - */ - public static final Polarization LINEAR_VERTICAL = fromString("linearVertical"); - - /** - * Static value linearHorizontal for Polarization. - */ - public static final Polarization LINEAR_HORIZONTAL = fromString("linearHorizontal"); - - /** - * Creates a new instance of Polarization value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Polarization() { - } - - /** - * Creates or finds a Polarization from its string representation. - * - * @param name a name to look for. - * @return the corresponding Polarization. - */ - public static Polarization fromString(String name) { - return fromString(name, Polarization.class); - } - - /** - * Gets known Polarization values. - * - * @return known Polarization values. - */ - public static Collection values() { - return values(Polarization.class); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Protocol.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Protocol.java deleted file mode 100644 index 6a0fe7d99c1b..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Protocol.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Protocol either UDP or TCP. - */ -public final class Protocol extends ExpandableStringEnum { - /** - * Static value TCP for Protocol. - */ - public static final Protocol TCP = fromString("TCP"); - - /** - * Static value UDP for Protocol. - */ - public static final Protocol UDP = fromString("UDP"); - - /** - * Creates a new instance of Protocol value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Protocol() { - } - - /** - * Creates or finds a Protocol from its string representation. - * - * @param name a name to look for. - * @return the corresponding Protocol. - */ - public static Protocol fromString(String name) { - return fromString(name, Protocol.class); - } - - /** - * Gets known Protocol values. - * - * @return known Protocol values. - */ - public static Collection values() { - return values(Protocol.class); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ReleaseMode.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ReleaseMode.java deleted file mode 100644 index f97c9f68603f..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ReleaseMode.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Release Status of a ground station. - */ -public final class ReleaseMode extends ExpandableStringEnum { - /** - * Static value Preview for ReleaseMode. - */ - public static final ReleaseMode PREVIEW = fromString("Preview"); - - /** - * Static value GA for ReleaseMode. - */ - public static final ReleaseMode GA = fromString("GA"); - - /** - * Creates a new instance of ReleaseMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ReleaseMode() { - } - - /** - * Creates or finds a ReleaseMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding ReleaseMode. - */ - public static ReleaseMode fromString(String name) { - return fromString(name, ReleaseMode.class); - } - - /** - * Gets known ReleaseMode values. - * - * @return known ReleaseMode values. - */ - public static Collection values() { - return values(ReleaseMode.class); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ResourceReference.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ResourceReference.java deleted file mode 100644 index 90c3b8bdf74c..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ResourceReference.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Resource Reference. - */ -@Fluent -public class ResourceReference implements JsonSerializable { - /* - * Resource ID. - */ - private String id; - - /** - * Creates an instance of ResourceReference class. - */ - public ResourceReference() { - } - - /** - * Get the id property: Resource ID. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: Resource ID. - * - * @param id the id value to set. - * @return the ResourceReference object itself. - */ - public ResourceReference withId(String id) { - this.id = id; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (id() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property id in model ResourceReference")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ResourceReference.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", this.id); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ResourceReference from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ResourceReference if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ResourceReference. - */ - public static ResourceReference fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ResourceReference deserializedResourceReference = new ResourceReference(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedResourceReference.id = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedResourceReference; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Spacecraft.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Spacecraft.java deleted file mode 100644 index 99e39e5c8125..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Spacecraft.java +++ /dev/null @@ -1,382 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.orbital.fluent.models.SpacecraftInner; -import java.util.List; -import java.util.Map; - -/** - * An immutable client-side representation of Spacecraft. - */ -public interface Spacecraft { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the provisioningState property: The current state of the resource's creation, deletion, or modification. - * - * @return the provisioningState value. - */ - SpacecraftsPropertiesProvisioningState provisioningState(); - - /** - * Gets the noradId property: NORAD ID of the spacecraft. - * - * @return the noradId value. - */ - String noradId(); - - /** - * Gets the titleLine property: Title line of the two-line element set (TLE). - * - * @return the titleLine value. - */ - String titleLine(); - - /** - * Gets the tleLine1 property: Line 1 of the two-line element set (TLE). - * - * @return the tleLine1 value. - */ - String tleLine1(); - - /** - * Gets the tleLine2 property: Line 2 of the two-line element set (TLE). - * - * @return the tleLine2 value. - */ - String tleLine2(); - - /** - * Gets the links property: Immutable list of Spacecraft links. - * - * @return the links value. - */ - List links(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.orbital.fluent.models.SpacecraftInner object. - * - * @return the inner object. - */ - SpacecraftInner innerModel(); - - /** - * The entirety of the Spacecraft definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithTitleLine, DefinitionStages.WithTleLine1, - DefinitionStages.WithTleLine2, DefinitionStages.WithLinks, DefinitionStages.WithCreate { - } - - /** - * The Spacecraft definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the Spacecraft definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the Spacecraft definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(String location); - } - - /** - * The stage of the Spacecraft definition allowing to specify parent resource. - */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @return the next definition stage. - */ - WithTitleLine withExistingResourceGroup(String resourceGroupName); - } - - /** - * The stage of the Spacecraft definition allowing to specify titleLine. - */ - interface WithTitleLine { - /** - * Specifies the titleLine property: Title line of the two-line element set (TLE).. - * - * @param titleLine Title line of the two-line element set (TLE). - * @return the next definition stage. - */ - WithTleLine1 withTitleLine(String titleLine); - } - - /** - * The stage of the Spacecraft definition allowing to specify tleLine1. - */ - interface WithTleLine1 { - /** - * Specifies the tleLine1 property: Line 1 of the two-line element set (TLE).. - * - * @param tleLine1 Line 1 of the two-line element set (TLE). - * @return the next definition stage. - */ - WithTleLine2 withTleLine1(String tleLine1); - } - - /** - * The stage of the Spacecraft definition allowing to specify tleLine2. - */ - interface WithTleLine2 { - /** - * Specifies the tleLine2 property: Line 2 of the two-line element set (TLE).. - * - * @param tleLine2 Line 2 of the two-line element set (TLE). - * @return the next definition stage. - */ - WithLinks withTleLine2(String tleLine2); - } - - /** - * The stage of the Spacecraft definition allowing to specify links. - */ - interface WithLinks { - /** - * Specifies the links property: Immutable list of Spacecraft links.. - * - * @param links Immutable list of Spacecraft links. - * @return the next definition stage. - */ - WithCreate withLinks(List links); - } - - /** - * The stage of the Spacecraft definition which contains all the minimum required properties for the resource to - * be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithTags, DefinitionStages.WithProvisioningState, DefinitionStages.WithNoradId { - /** - * Executes the create request. - * - * @return the created resource. - */ - Spacecraft create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Spacecraft create(Context context); - } - - /** - * The stage of the Spacecraft definition allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - - /** - * The stage of the Spacecraft definition allowing to specify provisioningState. - */ - interface WithProvisioningState { - /** - * Specifies the provisioningState property: The current state of the resource's creation, deletion, or - * modification.. - * - * @param provisioningState The current state of the resource's creation, deletion, or modification. - * @return the next definition stage. - */ - WithCreate withProvisioningState(SpacecraftsPropertiesProvisioningState provisioningState); - } - - /** - * The stage of the Spacecraft definition allowing to specify noradId. - */ - interface WithNoradId { - /** - * Specifies the noradId property: NORAD ID of the spacecraft.. - * - * @param noradId NORAD ID of the spacecraft. - * @return the next definition stage. - */ - WithCreate withNoradId(String noradId); - } - } - - /** - * Begins update for the Spacecraft resource. - * - * @return the stage of resource update. - */ - Spacecraft.Update update(); - - /** - * The template for Spacecraft update. - */ - interface Update extends UpdateStages.WithTags { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Spacecraft apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Spacecraft apply(Context context); - } - - /** - * The Spacecraft update stages. - */ - interface UpdateStages { - /** - * The stage of the Spacecraft update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Spacecraft refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Spacecraft refresh(Context context); - - /** - * Returns list of available contacts. A contact is available if the spacecraft is visible from the ground station - * for more than the minimum viable contact duration provided in the contact profile. - * - * @param parameters The parameters to provide for the contacts. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListAvailableContacts API service call as paginated response with {@link PagedIterable}. - */ - PagedIterable listAvailableContacts(ContactParameters parameters); - - /** - * Returns list of available contacts. A contact is available if the spacecraft is visible from the ground station - * for more than the minimum viable contact duration provided in the contact profile. - * - * @param parameters The parameters to provide for the contacts. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListAvailableContacts API service call as paginated response with {@link PagedIterable}. - */ - PagedIterable listAvailableContacts(ContactParameters parameters, Context context); -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/SpacecraftLink.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/SpacecraftLink.java deleted file mode 100644 index e22797dcbfaf..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/SpacecraftLink.java +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * List of authorized spacecraft links per ground station and the expiration date of the authorization. - */ -@Fluent -public final class SpacecraftLink implements JsonSerializable { - /* - * Link name. - */ - private String name; - - /* - * Center Frequency in MHz. - */ - private float centerFrequencyMHz; - - /* - * Bandwidth in MHz. - */ - private float bandwidthMHz; - - /* - * Direction (Uplink or Downlink). - */ - private Direction direction; - - /* - * Polarization. e.g. (RHCP, LHCP). - */ - private Polarization polarization; - - /* - * Authorized Ground Stations - */ - private List authorizations; - - /** - * Creates an instance of SpacecraftLink class. - */ - public SpacecraftLink() { - } - - /** - * Get the name property: Link name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Link name. - * - * @param name the name value to set. - * @return the SpacecraftLink object itself. - */ - public SpacecraftLink withName(String name) { - this.name = name; - return this; - } - - /** - * Get the centerFrequencyMHz property: Center Frequency in MHz. - * - * @return the centerFrequencyMHz value. - */ - public float centerFrequencyMHz() { - return this.centerFrequencyMHz; - } - - /** - * Set the centerFrequencyMHz property: Center Frequency in MHz. - * - * @param centerFrequencyMHz the centerFrequencyMHz value to set. - * @return the SpacecraftLink object itself. - */ - public SpacecraftLink withCenterFrequencyMHz(float centerFrequencyMHz) { - this.centerFrequencyMHz = centerFrequencyMHz; - return this; - } - - /** - * Get the bandwidthMHz property: Bandwidth in MHz. - * - * @return the bandwidthMHz value. - */ - public float bandwidthMHz() { - return this.bandwidthMHz; - } - - /** - * Set the bandwidthMHz property: Bandwidth in MHz. - * - * @param bandwidthMHz the bandwidthMHz value to set. - * @return the SpacecraftLink object itself. - */ - public SpacecraftLink withBandwidthMHz(float bandwidthMHz) { - this.bandwidthMHz = bandwidthMHz; - return this; - } - - /** - * Get the direction property: Direction (Uplink or Downlink). - * - * @return the direction value. - */ - public Direction direction() { - return this.direction; - } - - /** - * Set the direction property: Direction (Uplink or Downlink). - * - * @param direction the direction value to set. - * @return the SpacecraftLink object itself. - */ - public SpacecraftLink withDirection(Direction direction) { - this.direction = direction; - return this; - } - - /** - * Get the polarization property: Polarization. e.g. (RHCP, LHCP). - * - * @return the polarization value. - */ - public Polarization polarization() { - return this.polarization; - } - - /** - * Set the polarization property: Polarization. e.g. (RHCP, LHCP). - * - * @param polarization the polarization value to set. - * @return the SpacecraftLink object itself. - */ - public SpacecraftLink withPolarization(Polarization polarization) { - this.polarization = polarization; - return this; - } - - /** - * Get the authorizations property: Authorized Ground Stations. - * - * @return the authorizations value. - */ - public List authorizations() { - return this.authorizations; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property name in model SpacecraftLink")); - } - if (direction() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property direction in model SpacecraftLink")); - } - if (polarization() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property polarization in model SpacecraftLink")); - } - if (authorizations() != null) { - authorizations().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SpacecraftLink.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeFloatField("centerFrequencyMHz", this.centerFrequencyMHz); - jsonWriter.writeFloatField("bandwidthMHz", this.bandwidthMHz); - jsonWriter.writeStringField("direction", this.direction == null ? null : this.direction.toString()); - jsonWriter.writeStringField("polarization", this.polarization == null ? null : this.polarization.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SpacecraftLink from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SpacecraftLink if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SpacecraftLink. - */ - public static SpacecraftLink fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SpacecraftLink deserializedSpacecraftLink = new SpacecraftLink(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedSpacecraftLink.name = reader.getString(); - } else if ("centerFrequencyMHz".equals(fieldName)) { - deserializedSpacecraftLink.centerFrequencyMHz = reader.getFloat(); - } else if ("bandwidthMHz".equals(fieldName)) { - deserializedSpacecraftLink.bandwidthMHz = reader.getFloat(); - } else if ("direction".equals(fieldName)) { - deserializedSpacecraftLink.direction = Direction.fromString(reader.getString()); - } else if ("polarization".equals(fieldName)) { - deserializedSpacecraftLink.polarization = Polarization.fromString(reader.getString()); - } else if ("authorizations".equals(fieldName)) { - List authorizations - = reader.readArray(reader1 -> AuthorizedGroundstation.fromJson(reader1)); - deserializedSpacecraftLink.authorizations = authorizations; - } else { - reader.skipChildren(); - } - } - - return deserializedSpacecraftLink; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/SpacecraftListResult.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/SpacecraftListResult.java deleted file mode 100644 index bd782e1ea7a6..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/SpacecraftListResult.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.orbital.fluent.models.SpacecraftInner; -import java.io.IOException; -import java.util.List; - -/** - * Response for the ListSpacecrafts API service call. - */ -@Fluent -public final class SpacecraftListResult implements JsonSerializable { - /* - * A list of spacecraft resources in a resource group. - */ - private List value; - - /* - * The URL to get the next set of results. - */ - private String nextLink; - - /** - * Creates an instance of SpacecraftListResult class. - */ - public SpacecraftListResult() { - } - - /** - * Get the value property: A list of spacecraft resources in a resource group. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: A list of spacecraft resources in a resource group. - * - * @param value the value value to set. - * @return the SpacecraftListResult object itself. - */ - public SpacecraftListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URL to get the next set of results. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SpacecraftListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SpacecraftListResult if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the SpacecraftListResult. - */ - public static SpacecraftListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SpacecraftListResult deserializedSpacecraftListResult = new SpacecraftListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> SpacecraftInner.fromJson(reader1)); - deserializedSpacecraftListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedSpacecraftListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSpacecraftListResult; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Spacecrafts.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Spacecrafts.java deleted file mode 100644 index e01cda7d6876..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Spacecrafts.java +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of Spacecrafts. - */ -public interface Spacecrafts { - /** - * Returns list of spacecrafts by subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * Returns list of spacecrafts by subscription. - * - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String skiptoken, Context context); - - /** - * Returns list of spacecrafts by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Returns list of spacecrafts by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, String skiptoken, Context context); - - /** - * Gets the specified spacecraft in a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified spacecraft in a specified resource group along with {@link Response}. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String spacecraftName, - Context context); - - /** - * Gets the specified spacecraft in a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified spacecraft in a specified resource group. - */ - Spacecraft getByResourceGroup(String resourceGroupName, String spacecraftName); - - /** - * Deletes a specified spacecraft resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByResourceGroup(String resourceGroupName, String spacecraftName); - - /** - * Deletes a specified spacecraft resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String spacecraftName, Context context); - - /** - * Returns list of available contacts. A contact is available if the spacecraft is visible from the ground station - * for more than the minimum viable contact duration provided in the contact profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters The parameters to provide for the contacts. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListAvailableContacts API service call as paginated response with {@link PagedIterable}. - */ - PagedIterable listAvailableContacts(String resourceGroupName, String spacecraftName, - ContactParameters parameters); - - /** - * Returns list of available contacts. A contact is available if the spacecraft is visible from the ground station - * for more than the minimum viable contact duration provided in the contact profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param spacecraftName Spacecraft ID. - * @param parameters The parameters to provide for the contacts. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListAvailableContacts API service call as paginated response with {@link PagedIterable}. - */ - PagedIterable listAvailableContacts(String resourceGroupName, String spacecraftName, - ContactParameters parameters, Context context); - - /** - * Gets the specified spacecraft in a specified resource group. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified spacecraft in a specified resource group along with {@link Response}. - */ - Spacecraft getById(String id); - - /** - * Gets the specified spacecraft in a specified resource group. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified spacecraft in a specified resource group along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a specified spacecraft resource. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Deletes a specified spacecraft resource. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Spacecraft resource. - * - * @param name resource name. - * @return the first stage of the new Spacecraft definition. - */ - Spacecraft.DefinitionStages.Blank define(String name); -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/SpacecraftsPropertiesProvisioningState.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/SpacecraftsPropertiesProvisioningState.java deleted file mode 100644 index 2aef93fd9a4f..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/SpacecraftsPropertiesProvisioningState.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The current state of the resource's creation, deletion, or modification. - */ -public final class SpacecraftsPropertiesProvisioningState - extends ExpandableStringEnum { - /** - * Static value creating for SpacecraftsPropertiesProvisioningState. - */ - public static final SpacecraftsPropertiesProvisioningState CREATING = fromString("creating"); - - /** - * Static value succeeded for SpacecraftsPropertiesProvisioningState. - */ - public static final SpacecraftsPropertiesProvisioningState SUCCEEDED = fromString("succeeded"); - - /** - * Static value failed for SpacecraftsPropertiesProvisioningState. - */ - public static final SpacecraftsPropertiesProvisioningState FAILED = fromString("failed"); - - /** - * Static value canceled for SpacecraftsPropertiesProvisioningState. - */ - public static final SpacecraftsPropertiesProvisioningState CANCELED = fromString("canceled"); - - /** - * Static value updating for SpacecraftsPropertiesProvisioningState. - */ - public static final SpacecraftsPropertiesProvisioningState UPDATING = fromString("updating"); - - /** - * Static value deleting for SpacecraftsPropertiesProvisioningState. - */ - public static final SpacecraftsPropertiesProvisioningState DELETING = fromString("deleting"); - - /** - * Creates a new instance of SpacecraftsPropertiesProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SpacecraftsPropertiesProvisioningState() { - } - - /** - * Creates or finds a SpacecraftsPropertiesProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding SpacecraftsPropertiesProvisioningState. - */ - public static SpacecraftsPropertiesProvisioningState fromString(String name) { - return fromString(name, SpacecraftsPropertiesProvisioningState.class); - } - - /** - * Gets known SpacecraftsPropertiesProvisioningState values. - * - * @return known SpacecraftsPropertiesProvisioningState values. - */ - public static Collection values() { - return values(SpacecraftsPropertiesProvisioningState.class); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Status.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Status.java deleted file mode 100644 index deea1f677d44..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Status.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The status of operation. - */ -public final class Status extends ExpandableStringEnum { - /** - * Static value Succeeded for Status. - */ - public static final Status SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Canceled for Status. - */ - public static final Status CANCELED = fromString("Canceled"); - - /** - * Static value Failed for Status. - */ - public static final Status FAILED = fromString("Failed"); - - /** - * Static value Running for Status. - */ - public static final Status RUNNING = fromString("Running"); - - /** - * Creates a new instance of Status value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Status() { - } - - /** - * Creates or finds a Status from its string representation. - * - * @param name a name to look for. - * @return the corresponding Status. - */ - public static Status fromString(String name) { - return fromString(name, Status.class); - } - - /** - * Gets known Status values. - * - * @return known Status values. - */ - public static Collection values() { - return values(Status.class); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/TagsObject.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/TagsObject.java deleted file mode 100644 index a4d9e1702381..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/TagsObject.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Tags object for patch operations. - */ -@Fluent -public final class TagsObject implements JsonSerializable { - /* - * Resource tags. - */ - private Map tags; - - /** - * Creates an instance of TagsObject class. - */ - public TagsObject() { - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the TagsObject object itself. - */ - public TagsObject withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TagsObject from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TagsObject if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the TagsObject. - */ - public static TagsObject fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TagsObject deserializedTagsObject = new TagsObject(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedTagsObject.tags = tags; - } else { - reader.skipChildren(); - } - } - - return deserializedTagsObject; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/package-info.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/package-info.java deleted file mode 100644 index cc50e65ed389..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the data models for AzureOrbital. - * Azure Orbital service. - */ -package com.azure.resourcemanager.orbital.models; diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/package-info.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/package-info.java deleted file mode 100644 index ed04df781052..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the classes for AzureOrbital. - * Azure Orbital service. - */ -package com.azure.resourcemanager.orbital; diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/module-info.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/module-info.java deleted file mode 100644 index fda5b29644b6..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/module-info.java +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -module com.azure.resourcemanager.orbital { - requires transitive com.azure.core.management; - - exports com.azure.resourcemanager.orbital; - exports com.azure.resourcemanager.orbital.fluent; - exports com.azure.resourcemanager.orbital.fluent.models; - exports com.azure.resourcemanager.orbital.models; - - opens com.azure.resourcemanager.orbital.fluent.models to com.azure.core; - opens com.azure.resourcemanager.orbital.models to com.azure.core; -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-orbital/proxy-config.json b/sdk/orbital/azure-resourcemanager-orbital/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-orbital/proxy-config.json deleted file mode 100644 index c7fa8e11f907..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-orbital/proxy-config.json +++ /dev/null @@ -1 +0,0 @@ -[["com.azure.resourcemanager.orbital.implementation.AvailableGroundStationsClientImpl$AvailableGroundStationsService"],["com.azure.resourcemanager.orbital.implementation.ContactProfilesClientImpl$ContactProfilesService"],["com.azure.resourcemanager.orbital.implementation.ContactsClientImpl$ContactsService"],["com.azure.resourcemanager.orbital.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.orbital.implementation.OperationsResultsClientImpl$OperationsResultsService"],["com.azure.resourcemanager.orbital.implementation.SpacecraftsClientImpl$SpacecraftsService"]] \ No newline at end of file diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-orbital/reflect-config.json b/sdk/orbital/azure-resourcemanager-orbital/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-orbital/reflect-config.json deleted file mode 100644 index 0637a088a01e..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-orbital/reflect-config.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/AvailableGroundStationsListSamples.java b/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/AvailableGroundStationsListSamples.java deleted file mode 100644 index bb0f8615448c..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/AvailableGroundStationsListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.resourcemanager.orbital.models.CapabilityParameter; - -/** - * Samples for AvailableGroundStations List. - */ -public final class AvailableGroundStationsListSamples { - /* - * x-ms-original-file: specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/ - * AvailableGroundStationsByCapabilityList.json - */ - /** - * Sample code: List of Ground Stations by Capability. - * - * @param manager Entry point to OrbitalManager. - */ - public static void listOfGroundStationsByCapability(com.azure.resourcemanager.orbital.OrbitalManager manager) { - manager.availableGroundStations().list(CapabilityParameter.EARTH_OBSERVATION, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/ContactProfilesCreateOrUpdateSamples.java b/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/ContactProfilesCreateOrUpdateSamples.java deleted file mode 100644 index bc7de307e1c5..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/ContactProfilesCreateOrUpdateSamples.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.resourcemanager.orbital.models.AutoTrackingConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfileLink; -import com.azure.resourcemanager.orbital.models.ContactProfileLinkChannel; -import com.azure.resourcemanager.orbital.models.ContactProfileThirdPartyConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesNetworkConfiguration; -import com.azure.resourcemanager.orbital.models.Direction; -import com.azure.resourcemanager.orbital.models.EndPoint; -import com.azure.resourcemanager.orbital.models.Polarization; -import com.azure.resourcemanager.orbital.models.Protocol; -import java.util.Arrays; - -/** - * Samples for ContactProfiles CreateOrUpdate. - */ -public final class ContactProfilesCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/ContactProfileCreate.json - */ - /** - * Sample code: Create a contact profile. - * - * @param manager Entry point to OrbitalManager. - */ - public static void createAContactProfile(com.azure.resourcemanager.orbital.OrbitalManager manager) { - manager.contactProfiles() - .define("CONTOSO-CP") - .withRegion("eastus2") - .withExistingResourceGroup("contoso-Rgp") - .withNetworkConfiguration(new ContactProfilesPropertiesNetworkConfiguration().withSubnetId( - "/subscriptions/c1be1141-a7c9-4aac-9608-3c2e2f1152c3/resourceGroups/contoso-Rgp/providers/Microsoft.Network/virtualNetworks/contoso-vnet/subnets/orbital-delegated-subnet")) - .withLinks(Arrays.asList( - new ContactProfileLink().withName("contoso-uplink") - .withPolarization(Polarization.LHCP) - .withDirection(Direction.UPLINK) - .withGainOverTemperature(0.0F) - .withEirpdBW(45.0F) - .withChannels(Arrays.asList(new ContactProfileLinkChannel().withName("contoso-uplink-channel") - .withCenterFrequencyMHz(2250f) - .withBandwidthMHz(2f) - .withEndPoint(new EndPoint().withIpAddress("10.1.0.4") - .withEndPointName("ContosoTest_Uplink") - .withPort("50000") - .withProtocol(Protocol.TCP)))), - new ContactProfileLink().withName("contoso-downlink") - .withPolarization(Polarization.RHCP) - .withDirection(Direction.DOWNLINK) - .withGainOverTemperature(25.0F) - .withEirpdBW(0.0F) - .withChannels(Arrays.asList(new ContactProfileLinkChannel().withName("contoso-downlink-channel") - .withCenterFrequencyMHz(8160f) - .withBandwidthMHz(15f) - .withEndPoint(new EndPoint().withIpAddress("10.1.0.5") - .withEndPointName("ContosoTest_Downlink") - .withPort("50001") - .withProtocol(Protocol.UDP)))))) - .withMinimumViableContactDuration("PT1M") - .withMinimumElevationDegrees(5.0F) - .withAutoTrackingConfiguration(AutoTrackingConfiguration.DISABLED) - .withEventHubUri( - "/subscriptions/c1be1141-a7c9-4aac-9608-3c2e2f1152c3/resourceGroups/contoso-Rgp/providers/Microsoft.EventHub/namespaces/contosoHub/eventhubs/contosoHub") - .withThirdPartyConfigurations(Arrays.asList( - new ContactProfileThirdPartyConfiguration().withProviderName("KSAT") - .withMissionConfiguration("Ksat_MissionConfiguration"), - new ContactProfileThirdPartyConfiguration().withProviderName("VIASAT") - .withMissionConfiguration("Viasat_Configuration"))) - .create(); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/ContactProfilesDeleteSamples.java b/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/ContactProfilesDeleteSamples.java deleted file mode 100644 index 3ea44972839b..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/ContactProfilesDeleteSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -/** - * Samples for ContactProfiles Delete. - */ -public final class ContactProfilesDeleteSamples { - /* - * x-ms-original-file: - * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/ContactProfileDelete.json - */ - /** - * Sample code: Delete Contact Profile. - * - * @param manager Entry point to OrbitalManager. - */ - public static void deleteContactProfile(com.azure.resourcemanager.orbital.OrbitalManager manager) { - manager.contactProfiles().delete("contoso-Rgp", "CONTOSO-CP", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/ContactProfilesGetByResourceGroupSamples.java b/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/ContactProfilesGetByResourceGroupSamples.java deleted file mode 100644 index 269a5f4aa986..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/ContactProfilesGetByResourceGroupSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -/** - * Samples for ContactProfiles GetByResourceGroup. - */ -public final class ContactProfilesGetByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/ContactProfileGet.json - */ - /** - * Sample code: Get a contact profile. - * - * @param manager Entry point to OrbitalManager. - */ - public static void getAContactProfile(com.azure.resourcemanager.orbital.OrbitalManager manager) { - manager.contactProfiles() - .getByResourceGroupWithResponse("contoso-Rgp", "CONTOSO-CP", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/ContactProfilesListByResourceGroupSamples.java b/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/ContactProfilesListByResourceGroupSamples.java deleted file mode 100644 index 825e14b7839a..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/ContactProfilesListByResourceGroupSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -/** - * Samples for ContactProfiles ListByResourceGroup. - */ -public final class ContactProfilesListByResourceGroupSamples { - /* - * x-ms-original-file: specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/ - * ContactProfilesByResourceGroupList.json - */ - /** - * Sample code: List of Contact Profiles by Resource Group. - * - * @param manager Entry point to OrbitalManager. - */ - public static void listOfContactProfilesByResourceGroup(com.azure.resourcemanager.orbital.OrbitalManager manager) { - manager.contactProfiles().listByResourceGroup("contoso-Rgp", "opaqueString", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/ContactProfilesListSamples.java b/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/ContactProfilesListSamples.java deleted file mode 100644 index bbee7675012a..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/ContactProfilesListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -/** - * Samples for ContactProfiles List. - */ -public final class ContactProfilesListSamples { - /* - * x-ms-original-file: specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/ - * ContactProfilesBySubscriptionList.json - */ - /** - * Sample code: List of Contact Profiles. - * - * @param manager Entry point to OrbitalManager. - */ - public static void listOfContactProfiles(com.azure.resourcemanager.orbital.OrbitalManager manager) { - manager.contactProfiles().list("opaqueString", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/ContactProfilesUpdateTagsSamples.java b/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/ContactProfilesUpdateTagsSamples.java deleted file mode 100644 index 7fa9e60380d7..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/ContactProfilesUpdateTagsSamples.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.resourcemanager.orbital.models.ContactProfile; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for ContactProfiles UpdateTags. - */ -public final class ContactProfilesUpdateTagsSamples { - /* - * x-ms-original-file: - * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/ContactProfileUpdateTag.json - */ - /** - * Sample code: Update Contact Profile tags. - * - * @param manager Entry point to OrbitalManager. - */ - public static void updateContactProfileTags(com.azure.resourcemanager.orbital.OrbitalManager manager) { - ContactProfile resource = manager.contactProfiles() - .getByResourceGroupWithResponse("contoso-Rgp", "CONTOSO-CP", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/ContactsCreateSamples.java b/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/ContactsCreateSamples.java deleted file mode 100644 index c00a9a8be8bd..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/ContactsCreateSamples.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.resourcemanager.orbital.models.ContactsPropertiesContactProfile; -import java.time.OffsetDateTime; - -/** - * Samples for Contacts Create. - */ -public final class ContactsCreateSamples { - /* - * x-ms-original-file: - * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/ContactCreate.json - */ - /** - * Sample code: Create a contact. - * - * @param manager Entry point to OrbitalManager. - */ - public static void createAContact(com.azure.resourcemanager.orbital.OrbitalManager manager) { - manager.contacts() - .define("contact1") - .withExistingSpacecraft("contoso-Rgp", "CONTOSO_SAT") - .withReservationStartTime(OffsetDateTime.parse("2023-02-22T10:58:30Z")) - .withReservationEndTime(OffsetDateTime.parse("2023-02-22T11:10:45Z")) - .withGroundStationName("EASTUS2_0") - .withContactProfile(new ContactsPropertiesContactProfile().withId( - "/subscriptions/c1be1141-a7c9-4aac-9608-3c2e2f1152c3/resourceGroups/contoso-Rgp/providers/Microsoft.Orbital/contactProfiles/CONTOSO-CP")) - .create(); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/ContactsDeleteSamples.java b/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/ContactsDeleteSamples.java deleted file mode 100644 index 5b4c157734e1..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/ContactsDeleteSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -/** - * Samples for Contacts Delete. - */ -public final class ContactsDeleteSamples { - /* - * x-ms-original-file: - * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/ContactDelete.json - */ - /** - * Sample code: Delete Contact. - * - * @param manager Entry point to OrbitalManager. - */ - public static void deleteContact(com.azure.resourcemanager.orbital.OrbitalManager manager) { - manager.contacts().delete("contoso-Rgp", "CONTOSO_SAT", "contact1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/ContactsGetSamples.java b/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/ContactsGetSamples.java deleted file mode 100644 index b1937d6b2b6d..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/ContactsGetSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -/** - * Samples for Contacts Get. - */ -public final class ContactsGetSamples { - /* - * x-ms-original-file: - * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/ContactGet.json - */ - /** - * Sample code: Get Contact. - * - * @param manager Entry point to OrbitalManager. - */ - public static void getContact(com.azure.resourcemanager.orbital.OrbitalManager manager) { - manager.contacts().getWithResponse("contoso-Rgp", "CONTOSO_SAT", "contact1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/ContactsListSamples.java b/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/ContactsListSamples.java deleted file mode 100644 index d203180a225d..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/ContactsListSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -/** - * Samples for Contacts List. - */ -public final class ContactsListSamples { - /* - * x-ms-original-file: - * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/ContactsBySpacecraftNameList. - * json - */ - /** - * Sample code: List of Spacecraft. - * - * @param manager Entry point to OrbitalManager. - */ - public static void listOfSpacecraft(com.azure.resourcemanager.orbital.OrbitalManager manager) { - manager.contacts().list("contoso-Rgp", "CONTOSO_SAT", "opaqueString", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/OperationsListSamples.java b/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/OperationsListSamples.java deleted file mode 100644 index b169f6210174..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/OperationsListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -/** - * Samples for Operations List. - */ -public final class OperationsListSamples { - /* - * x-ms-original-file: - * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/OperationsList.json - */ - /** - * Sample code: OperationsList. - * - * @param manager Entry point to OrbitalManager. - */ - public static void operationsList(com.azure.resourcemanager.orbital.OrbitalManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/OperationsResultsGetSamples.java b/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/OperationsResultsGetSamples.java deleted file mode 100644 index d9cdeced2131..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/OperationsResultsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -/** - * Samples for OperationsResults Get. - */ -public final class OperationsResultsGetSamples { - /* - * x-ms-original-file: - * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/OperationResultsGet.json - */ - /** - * Sample code: KustoOperationResultsGet. - * - * @param manager Entry point to OrbitalManager. - */ - public static void kustoOperationResultsGet(com.azure.resourcemanager.orbital.OrbitalManager manager) { - manager.operationsResults() - .get("eastus2", "30972f1b-b61d-4fd8-bd34-3dcfa24670f3", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/SpacecraftsCreateOrUpdateSamples.java b/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/SpacecraftsCreateOrUpdateSamples.java deleted file mode 100644 index 46ae4eb94077..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/SpacecraftsCreateOrUpdateSamples.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.resourcemanager.orbital.models.Direction; -import com.azure.resourcemanager.orbital.models.Polarization; -import com.azure.resourcemanager.orbital.models.SpacecraftLink; -import java.util.Arrays; - -/** - * Samples for Spacecrafts CreateOrUpdate. - */ -public final class SpacecraftsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/SpacecraftCreate.json - */ - /** - * Sample code: Create a spacecraft. - * - * @param manager Entry point to OrbitalManager. - */ - public static void createASpacecraft(com.azure.resourcemanager.orbital.OrbitalManager manager) { - manager.spacecrafts() - .define("CONTOSO_SAT") - .withRegion("eastus2") - .withExistingResourceGroup("contoso-Rgp") - .withTitleLine("CONTOSO_SAT") - .withTleLine1("1 27424U 02022A 22167.05119303 .00000638 00000+0 15103-3 0 9994") - .withTleLine2("2 27424 98.2477 108.9546 0000928 92.9194 327.0802 14.57300770 69982") - .withLinks(Arrays.asList( - new SpacecraftLink().withName("uplink_lhcp1") - .withCenterFrequencyMHz(2250f) - .withBandwidthMHz(2f) - .withDirection(Direction.UPLINK) - .withPolarization(Polarization.LHCP), - new SpacecraftLink().withName("downlink_rhcp1") - .withCenterFrequencyMHz(8160f) - .withBandwidthMHz(15f) - .withDirection(Direction.DOWNLINK) - .withPolarization(Polarization.RHCP))) - .withNoradId("36411") - .create(); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/SpacecraftsDeleteSamples.java b/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/SpacecraftsDeleteSamples.java deleted file mode 100644 index 58251f29d7c2..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/SpacecraftsDeleteSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -/** - * Samples for Spacecrafts Delete. - */ -public final class SpacecraftsDeleteSamples { - /* - * x-ms-original-file: - * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/SpacecraftDelete.json - */ - /** - * Sample code: Delete Spacecraft. - * - * @param manager Entry point to OrbitalManager. - */ - public static void deleteSpacecraft(com.azure.resourcemanager.orbital.OrbitalManager manager) { - manager.spacecrafts().delete("contoso-Rgp", "CONTOSO_SAT", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/SpacecraftsGetByResourceGroupSamples.java b/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/SpacecraftsGetByResourceGroupSamples.java deleted file mode 100644 index b28da51c57f1..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/SpacecraftsGetByResourceGroupSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -/** - * Samples for Spacecrafts GetByResourceGroup. - */ -public final class SpacecraftsGetByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/SpacecraftGet.json - */ - /** - * Sample code: Get Spacecraft. - * - * @param manager Entry point to OrbitalManager. - */ - public static void getSpacecraft(com.azure.resourcemanager.orbital.OrbitalManager manager) { - manager.spacecrafts() - .getByResourceGroupWithResponse("contoso-Rgp", "CONTOSO_SAT", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/SpacecraftsListAvailableContactsSamples.java b/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/SpacecraftsListAvailableContactsSamples.java deleted file mode 100644 index fd36a8713559..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/SpacecraftsListAvailableContactsSamples.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.resourcemanager.orbital.models.ContactParameters; -import com.azure.resourcemanager.orbital.models.ContactParametersContactProfile; -import java.time.OffsetDateTime; - -/** - * Samples for Spacecrafts ListAvailableContacts. - */ -public final class SpacecraftsListAvailableContactsSamples { - /* - * x-ms-original-file: - * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/AvailableContactsList.json - */ - /** - * Sample code: List of Contact. - * - * @param manager Entry point to OrbitalManager. - */ - public static void listOfContact(com.azure.resourcemanager.orbital.OrbitalManager manager) { - manager.spacecrafts() - .listAvailableContacts("contoso-Rgp", "CONTOSO_SAT", - new ContactParameters().withContactProfile(new ContactParametersContactProfile().withId( - "/subscriptions/c1be1141-a7c9-4aac-9608-3c2e2f1152c3/resourceGroups/contoso-Rgp/providers/Microsoft.Orbital/contactProfiles/CONTOSO-CP")) - .withGroundStationName("EASTUS2_0") - .withStartTime(OffsetDateTime.parse("2022-11-01T11:30:00Z")) - .withEndTime(OffsetDateTime.parse("2022-11-02T11:30:00Z")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/SpacecraftsListByResourceGroupSamples.java b/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/SpacecraftsListByResourceGroupSamples.java deleted file mode 100644 index c7eb57139e79..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/SpacecraftsListByResourceGroupSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -/** - * Samples for Spacecrafts ListByResourceGroup. - */ -public final class SpacecraftsListByResourceGroupSamples { - /* - * x-ms-original-file: specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/ - * SpacecraftsByResourceGroupList.json - */ - /** - * Sample code: List of Spacecraft by Resource Group. - * - * @param manager Entry point to OrbitalManager. - */ - public static void listOfSpacecraftByResourceGroup(com.azure.resourcemanager.orbital.OrbitalManager manager) { - manager.spacecrafts().listByResourceGroup("contoso-Rgp", "opaqueString", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/SpacecraftsListSamples.java b/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/SpacecraftsListSamples.java deleted file mode 100644 index e2dc1a0944f4..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/SpacecraftsListSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -/** - * Samples for Spacecrafts List. - */ -public final class SpacecraftsListSamples { - /* - * x-ms-original-file: - * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/SpacecraftsBySubscriptionList - * .json - */ - /** - * Sample code: List of Spacecraft by Subscription. - * - * @param manager Entry point to OrbitalManager. - */ - public static void listOfSpacecraftBySubscription(com.azure.resourcemanager.orbital.OrbitalManager manager) { - manager.spacecrafts().list("opaqueString", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/SpacecraftsUpdateTagsSamples.java b/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/SpacecraftsUpdateTagsSamples.java deleted file mode 100644 index a5ae07dd7d33..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/SpacecraftsUpdateTagsSamples.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.resourcemanager.orbital.models.Spacecraft; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Spacecrafts UpdateTags. - */ -public final class SpacecraftsUpdateTagsSamples { - /* - * x-ms-original-file: - * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/SpacecraftUpdateTags.json - */ - /** - * Sample code: Update Spacecraft tags. - * - * @param manager Entry point to OrbitalManager. - */ - public static void updateSpacecraftTags(com.azure.resourcemanager.orbital.OrbitalManager manager) { - Spacecraft resource = manager.spacecrafts() - .getByResourceGroupWithResponse("contoso-Rgp", "CONTOSO_SAT", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AuthorizedGroundstationTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AuthorizedGroundstationTests.java deleted file mode 100644 index 391a2284bdf0..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AuthorizedGroundstationTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.AuthorizedGroundstation; -import org.junit.jupiter.api.Assertions; - -public final class AuthorizedGroundstationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AuthorizedGroundstation model - = BinaryData.fromString("{\"groundStation\":\"wfzitonpeqfpjk\"}").toObject(AuthorizedGroundstation.class); - Assertions.assertEquals("wfzitonpeqfpjk", model.groundStation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AuthorizedGroundstation model = new AuthorizedGroundstation().withGroundStation("wfzitonpeqfpjk"); - model = BinaryData.fromObject(model).toObject(AuthorizedGroundstation.class); - Assertions.assertEquals("wfzitonpeqfpjk", model.groundStation()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableContactsInnerTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableContactsInnerTests.java deleted file mode 100644 index 0a9144d4275f..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableContactsInnerTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.fluent.models.AvailableContactsInner; -import com.azure.resourcemanager.orbital.models.AvailableContactsSpacecraft; -import org.junit.jupiter.api.Assertions; - -public final class AvailableContactsInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableContactsInner model = BinaryData.fromString( - "{\"spacecraft\":{\"id\":\"zcxtbzsgfyccsn\"},\"groundStationName\":\"mdwzjeiachboo\",\"properties\":{\"maximumElevationDegrees\":55.106743,\"txStartTime\":\"2021-10-01T08:17:31Z\",\"txEndTime\":\"2021-04-28T23:01:46Z\",\"rxStartTime\":\"2021-02-19T13:41:36Z\",\"rxEndTime\":\"2021-12-01T09:51:17Z\",\"startAzimuthDegrees\":44.67273,\"endAzimuthDegrees\":77.50827,\"startElevationDegrees\":67.05552,\"endElevationDegrees\":45.170357}}") - .toObject(AvailableContactsInner.class); - Assertions.assertEquals("zcxtbzsgfyccsn", model.spacecraft().id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableContactsInner model - = new AvailableContactsInner().withSpacecraft(new AvailableContactsSpacecraft().withId("zcxtbzsgfyccsn")); - model = BinaryData.fromObject(model).toObject(AvailableContactsInner.class); - Assertions.assertEquals("zcxtbzsgfyccsn", model.spacecraft().id()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableContactsListResultTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableContactsListResultTests.java deleted file mode 100644 index 905d3541a017..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableContactsListResultTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.fluent.models.AvailableContactsInner; -import com.azure.resourcemanager.orbital.models.AvailableContactsListResult; -import com.azure.resourcemanager.orbital.models.AvailableContactsSpacecraft; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AvailableContactsListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableContactsListResult model = BinaryData.fromString( - "{\"value\":[{\"spacecraft\":{\"id\":\"fvzwdzuhty\"},\"groundStationName\":\"isdkfthwxmnteiw\",\"properties\":{\"maximumElevationDegrees\":76.722374,\"txStartTime\":\"2021-04-07T17:13:30Z\",\"txEndTime\":\"2021-09-18T09:57:46Z\",\"rxStartTime\":\"2021-01-28T05:49:48Z\",\"rxEndTime\":\"2021-11-05T05:35:16Z\",\"startAzimuthDegrees\":68.145454,\"endAzimuthDegrees\":56.80048,\"startElevationDegrees\":74.31171,\"endElevationDegrees\":66.845474}}],\"nextLink\":\"ymzidn\"}") - .toObject(AvailableContactsListResult.class); - Assertions.assertEquals("fvzwdzuhty", model.value().get(0).spacecraft().id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableContactsListResult model = new AvailableContactsListResult().withValue(Arrays.asList( - new AvailableContactsInner().withSpacecraft(new AvailableContactsSpacecraft().withId("fvzwdzuhty")))); - model = BinaryData.fromObject(model).toObject(AvailableContactsListResult.class); - Assertions.assertEquals("fvzwdzuhty", model.value().get(0).spacecraft().id()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableContactsPropertiesTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableContactsPropertiesTests.java deleted file mode 100644 index 28bc12922049..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableContactsPropertiesTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.fluent.models.AvailableContactsProperties; - -public final class AvailableContactsPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableContactsProperties model = BinaryData.fromString( - "{\"maximumElevationDegrees\":66.162094,\"txStartTime\":\"2021-08-28T07:05:13Z\",\"txEndTime\":\"2021-07-02T05:30:20Z\",\"rxStartTime\":\"2021-06-12T21:30:04Z\",\"rxEndTime\":\"2021-11-24T02:47:54Z\",\"startAzimuthDegrees\":20.800983,\"endAzimuthDegrees\":83.89717,\"startElevationDegrees\":20.97959,\"endElevationDegrees\":42.84593}") - .toObject(AvailableContactsProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableContactsProperties model = new AvailableContactsProperties(); - model = BinaryData.fromObject(model).toObject(AvailableContactsProperties.class); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableContactsSpacecraftTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableContactsSpacecraftTests.java deleted file mode 100644 index 7823536bb728..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableContactsSpacecraftTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.AvailableContactsSpacecraft; -import org.junit.jupiter.api.Assertions; - -public final class AvailableContactsSpacecraftTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableContactsSpacecraft model - = BinaryData.fromString("{\"id\":\"qrimzinpv\"}").toObject(AvailableContactsSpacecraft.class); - Assertions.assertEquals("qrimzinpv", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableContactsSpacecraft model = new AvailableContactsSpacecraft().withId("qrimzinpv"); - model = BinaryData.fromObject(model).toObject(AvailableContactsSpacecraft.class); - Assertions.assertEquals("qrimzinpv", model.id()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableGroundStationInnerTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableGroundStationInnerTests.java deleted file mode 100644 index 2f9f04aeccb4..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableGroundStationInnerTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.fluent.models.AvailableGroundStationInner; -import com.azure.resourcemanager.orbital.models.ReleaseMode; -import org.junit.jupiter.api.Assertions; - -public final class AvailableGroundStationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableGroundStationInner model = BinaryData.fromString( - "{\"id\":\"szufoxciqopidoa\",\"name\":\"iodhkhazxkhnz\",\"location\":\"nlwntoe\",\"type\":\"kdwbwhkszz\",\"properties\":{\"city\":\"rvexztvb\",\"providerName\":\"gsfraoyzkoow\",\"longitudeDegrees\":83.122345,\"latitudeDegrees\":88.73386,\"altitudeMeters\":85.48055,\"releaseMode\":\"Preview\"}}") - .toObject(AvailableGroundStationInner.class); - Assertions.assertEquals("nlwntoe", model.location()); - Assertions.assertEquals("rvexztvb", model.city()); - Assertions.assertEquals("gsfraoyzkoow", model.providerName()); - Assertions.assertEquals(83.122345F, model.longitudeDegrees()); - Assertions.assertEquals(88.73386F, model.latitudeDegrees()); - Assertions.assertEquals(85.48055F, model.altitudeMeters()); - Assertions.assertEquals(ReleaseMode.PREVIEW, model.releaseMode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableGroundStationInner model = new AvailableGroundStationInner().withLocation("nlwntoe") - .withCity("rvexztvb") - .withProviderName("gsfraoyzkoow") - .withLongitudeDegrees(83.122345F) - .withLatitudeDegrees(88.73386F) - .withAltitudeMeters(85.48055F) - .withReleaseMode(ReleaseMode.PREVIEW); - model = BinaryData.fromObject(model).toObject(AvailableGroundStationInner.class); - Assertions.assertEquals("nlwntoe", model.location()); - Assertions.assertEquals("rvexztvb", model.city()); - Assertions.assertEquals("gsfraoyzkoow", model.providerName()); - Assertions.assertEquals(83.122345F, model.longitudeDegrees()); - Assertions.assertEquals(88.73386F, model.latitudeDegrees()); - Assertions.assertEquals(85.48055F, model.altitudeMeters()); - Assertions.assertEquals(ReleaseMode.PREVIEW, model.releaseMode()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableGroundStationListResultTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableGroundStationListResultTests.java deleted file mode 100644 index 241265fd73b6..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableGroundStationListResultTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.fluent.models.AvailableGroundStationInner; -import com.azure.resourcemanager.orbital.models.AvailableGroundStationListResult; -import com.azure.resourcemanager.orbital.models.ReleaseMode; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AvailableGroundStationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableGroundStationListResult model = BinaryData.fromString( - "{\"value\":[{\"id\":\"vtvudutncormr\",\"name\":\"qtvcofudflvkgj\",\"location\":\"gdknnqv\",\"type\":\"znqntoru\",\"properties\":{\"city\":\"gsahmkycgrauw\",\"providerName\":\"etaebu\",\"longitudeDegrees\":82.7481,\"latitudeDegrees\":93.07586,\"altitudeMeters\":51.671677,\"releaseMode\":\"Preview\"}},{\"id\":\"l\",\"name\":\"ab\",\"location\":\"oefki\",\"type\":\"vtpuqujmqlgk\",\"properties\":{\"city\":\"tndoaongbjc\",\"providerName\":\"ujitcjedftww\",\"longitudeDegrees\":24.823893,\"latitudeDegrees\":63.156284,\"altitudeMeters\":5.341405,\"releaseMode\":\"Preview\"}}],\"nextLink\":\"zfoqouicybxar\"}") - .toObject(AvailableGroundStationListResult.class); - Assertions.assertEquals("gdknnqv", model.value().get(0).location()); - Assertions.assertEquals("gsahmkycgrauw", model.value().get(0).city()); - Assertions.assertEquals("etaebu", model.value().get(0).providerName()); - Assertions.assertEquals(82.7481F, model.value().get(0).longitudeDegrees()); - Assertions.assertEquals(93.07586F, model.value().get(0).latitudeDegrees()); - Assertions.assertEquals(51.671677F, model.value().get(0).altitudeMeters()); - Assertions.assertEquals(ReleaseMode.PREVIEW, model.value().get(0).releaseMode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableGroundStationListResult model = new AvailableGroundStationListResult().withValue(Arrays.asList( - new AvailableGroundStationInner().withLocation("gdknnqv") - .withCity("gsahmkycgrauw") - .withProviderName("etaebu") - .withLongitudeDegrees(82.7481F) - .withLatitudeDegrees(93.07586F) - .withAltitudeMeters(51.671677F) - .withReleaseMode(ReleaseMode.PREVIEW), - new AvailableGroundStationInner().withLocation("oefki") - .withCity("tndoaongbjc") - .withProviderName("ujitcjedftww") - .withLongitudeDegrees(24.823893F) - .withLatitudeDegrees(63.156284F) - .withAltitudeMeters(5.341405F) - .withReleaseMode(ReleaseMode.PREVIEW))); - model = BinaryData.fromObject(model).toObject(AvailableGroundStationListResult.class); - Assertions.assertEquals("gdknnqv", model.value().get(0).location()); - Assertions.assertEquals("gsahmkycgrauw", model.value().get(0).city()); - Assertions.assertEquals("etaebu", model.value().get(0).providerName()); - Assertions.assertEquals(82.7481F, model.value().get(0).longitudeDegrees()); - Assertions.assertEquals(93.07586F, model.value().get(0).latitudeDegrees()); - Assertions.assertEquals(51.671677F, model.value().get(0).altitudeMeters()); - Assertions.assertEquals(ReleaseMode.PREVIEW, model.value().get(0).releaseMode()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableGroundStationPropertiesAutoGeneratedTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableGroundStationPropertiesAutoGeneratedTests.java deleted file mode 100644 index 715a8a7e105b..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableGroundStationPropertiesAutoGeneratedTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.AvailableGroundStationPropertiesAutoGenerated; -import com.azure.resourcemanager.orbital.models.ReleaseMode; -import org.junit.jupiter.api.Assertions; - -public final class AvailableGroundStationPropertiesAutoGeneratedTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableGroundStationPropertiesAutoGenerated model = BinaryData.fromString( - "{\"city\":\"a\",\"providerName\":\"hrskdsnfd\",\"longitudeDegrees\":76.520065,\"latitudeDegrees\":58.32351,\"altitudeMeters\":61.956436,\"releaseMode\":\"Preview\"}") - .toObject(AvailableGroundStationPropertiesAutoGenerated.class); - Assertions.assertEquals("a", model.city()); - Assertions.assertEquals("hrskdsnfd", model.providerName()); - Assertions.assertEquals(76.520065F, model.longitudeDegrees()); - Assertions.assertEquals(58.32351F, model.latitudeDegrees()); - Assertions.assertEquals(61.956436F, model.altitudeMeters()); - Assertions.assertEquals(ReleaseMode.PREVIEW, model.releaseMode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableGroundStationPropertiesAutoGenerated model - = new AvailableGroundStationPropertiesAutoGenerated().withCity("a") - .withProviderName("hrskdsnfd") - .withLongitudeDegrees(76.520065F) - .withLatitudeDegrees(58.32351F) - .withAltitudeMeters(61.956436F) - .withReleaseMode(ReleaseMode.PREVIEW); - model = BinaryData.fromObject(model).toObject(AvailableGroundStationPropertiesAutoGenerated.class); - Assertions.assertEquals("a", model.city()); - Assertions.assertEquals("hrskdsnfd", model.providerName()); - Assertions.assertEquals(76.520065F, model.longitudeDegrees()); - Assertions.assertEquals(58.32351F, model.latitudeDegrees()); - Assertions.assertEquals(61.956436F, model.altitudeMeters()); - Assertions.assertEquals(ReleaseMode.PREVIEW, model.releaseMode()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableGroundStationPropertiesTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableGroundStationPropertiesTests.java deleted file mode 100644 index cd5363cb6334..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableGroundStationPropertiesTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.fluent.models.AvailableGroundStationProperties; -import com.azure.resourcemanager.orbital.models.ReleaseMode; -import org.junit.jupiter.api.Assertions; - -public final class AvailableGroundStationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableGroundStationProperties model = BinaryData.fromString( - "{\"city\":\"aldsy\",\"providerName\":\"ximerqfobwyznk\",\"longitudeDegrees\":32.21692,\"latitudeDegrees\":4.411727,\"altitudeMeters\":98.1842,\"releaseMode\":\"Preview\"}") - .toObject(AvailableGroundStationProperties.class); - Assertions.assertEquals("aldsy", model.city()); - Assertions.assertEquals("ximerqfobwyznk", model.providerName()); - Assertions.assertEquals(32.21692F, model.longitudeDegrees()); - Assertions.assertEquals(4.411727F, model.latitudeDegrees()); - Assertions.assertEquals(98.1842F, model.altitudeMeters()); - Assertions.assertEquals(ReleaseMode.PREVIEW, model.releaseMode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableGroundStationProperties model = new AvailableGroundStationProperties().withCity("aldsy") - .withProviderName("ximerqfobwyznk") - .withLongitudeDegrees(32.21692F) - .withLatitudeDegrees(4.411727F) - .withAltitudeMeters(98.1842F) - .withReleaseMode(ReleaseMode.PREVIEW); - model = BinaryData.fromObject(model).toObject(AvailableGroundStationProperties.class); - Assertions.assertEquals("aldsy", model.city()); - Assertions.assertEquals("ximerqfobwyznk", model.providerName()); - Assertions.assertEquals(32.21692F, model.longitudeDegrees()); - Assertions.assertEquals(4.411727F, model.latitudeDegrees()); - Assertions.assertEquals(98.1842F, model.altitudeMeters()); - Assertions.assertEquals(ReleaseMode.PREVIEW, model.releaseMode()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableGroundStationsListMockTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableGroundStationsListMockTests.java deleted file mode 100644 index 0ee84d14adfd..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableGroundStationsListMockTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.orbital.OrbitalManager; -import com.azure.resourcemanager.orbital.models.AvailableGroundStation; -import com.azure.resourcemanager.orbital.models.CapabilityParameter; -import com.azure.resourcemanager.orbital.models.ReleaseMode; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AvailableGroundStationsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"id\":\"sdzhezww\",\"name\":\"iqyuvvfo\",\"location\":\"p\",\"type\":\"qyikvy\",\"properties\":{\"city\":\"uyav\",\"providerName\":\"wmn\",\"longitudeDegrees\":81.981476,\"latitudeDegrees\":17.136473,\"altitudeMeters\":49.36264,\"releaseMode\":\"GA\"}}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OrbitalManager manager = OrbitalManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.availableGroundStations() - .list(CapabilityParameter.EARTH_OBSERVATION, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("p", response.iterator().next().location()); - Assertions.assertEquals("uyav", response.iterator().next().city()); - Assertions.assertEquals("wmn", response.iterator().next().providerName()); - Assertions.assertEquals(81.981476F, response.iterator().next().longitudeDegrees()); - Assertions.assertEquals(17.136473F, response.iterator().next().latitudeDegrees()); - Assertions.assertEquals(49.36264F, response.iterator().next().altitudeMeters()); - Assertions.assertEquals(ReleaseMode.GA, response.iterator().next().releaseMode()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactInnerTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactInnerTests.java deleted file mode 100644 index da18918c5e1e..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactInnerTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.fluent.models.ContactInner; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesContactProfile; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesProvisioningState; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class ContactInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContactInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"failed\",\"status\":\"cancelled\",\"reservationStartTime\":\"2021-09-03T01:46:22Z\",\"reservationEndTime\":\"2021-11-03T18:10:18Z\",\"rxStartTime\":\"2021-01-04T06:33:38Z\",\"rxEndTime\":\"2021-05-24T00:31:31Z\",\"txStartTime\":\"2021-11-02T07:55:59Z\",\"txEndTime\":\"2021-11-25T20:26:44Z\",\"errorMessage\":\"bacphejko\",\"maximumElevationDegrees\":64.57916,\"startAzimuthDegrees\":17.64155,\"endAzimuthDegrees\":71.94767,\"groundStationName\":\"l\",\"startElevationDegrees\":90.19363,\"endElevationDegrees\":5.8344603,\"antennaConfiguration\":{\"destinationIp\":\"yqkgfg\",\"sourceIps\":[\"adgakeqsrxybz\",\"qedqytbciqfoufl\",\"mnkzsmod\",\"glougpbk\"]},\"contactProfile\":{\"id\":\"tmut\"}},\"id\":\"qktapspwgcuert\",\"name\":\"mkdo\",\"type\":\"vqwhbmdgbbjfd\"}") - .toObject(ContactInner.class); - Assertions.assertEquals(ContactsPropertiesProvisioningState.FAILED, model.provisioningState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-03T01:46:22Z"), model.reservationStartTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-03T18:10:18Z"), model.reservationEndTime()); - Assertions.assertEquals("l", model.groundStationName()); - Assertions.assertEquals("tmut", model.contactProfile().id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContactInner model = new ContactInner().withProvisioningState(ContactsPropertiesProvisioningState.FAILED) - .withReservationStartTime(OffsetDateTime.parse("2021-09-03T01:46:22Z")) - .withReservationEndTime(OffsetDateTime.parse("2021-11-03T18:10:18Z")) - .withGroundStationName("l") - .withContactProfile(new ContactsPropertiesContactProfile().withId("tmut")); - model = BinaryData.fromObject(model).toObject(ContactInner.class); - Assertions.assertEquals(ContactsPropertiesProvisioningState.FAILED, model.provisioningState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-03T01:46:22Z"), model.reservationStartTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-03T18:10:18Z"), model.reservationEndTime()); - Assertions.assertEquals("l", model.groundStationName()); - Assertions.assertEquals("tmut", model.contactProfile().id()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactInstancePropertiesTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactInstancePropertiesTests.java deleted file mode 100644 index 0d742c705218..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactInstancePropertiesTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.ContactInstanceProperties; - -public final class ContactInstancePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContactInstanceProperties model = BinaryData.fromString( - "{\"maximumElevationDegrees\":53.583885,\"txStartTime\":\"2021-01-19T09:55:19Z\",\"txEndTime\":\"2020-12-26T05:08:12Z\",\"rxStartTime\":\"2021-01-23T02:14:07Z\",\"rxEndTime\":\"2021-05-11T08:11:32Z\",\"startAzimuthDegrees\":86.79924,\"endAzimuthDegrees\":14.297503,\"startElevationDegrees\":88.814865,\"endElevationDegrees\":82.8565}") - .toObject(ContactInstanceProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContactInstanceProperties model = new ContactInstanceProperties(); - model = BinaryData.fromObject(model).toObject(ContactInstanceProperties.class); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactListResultTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactListResultTests.java deleted file mode 100644 index af70d9f39666..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactListResultTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.fluent.models.ContactInner; -import com.azure.resourcemanager.orbital.models.ContactListResult; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesContactProfile; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesProvisioningState; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ContactListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContactListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"canceled\",\"status\":\"cancelled\",\"reservationStartTime\":\"2021-04-27T12:55:33Z\",\"reservationEndTime\":\"2021-04-24T03:44:15Z\",\"rxStartTime\":\"2021-08-30T04:38:09Z\",\"rxEndTime\":\"2021-09-01T11:04:48Z\",\"txStartTime\":\"2021-05-14T22:11:20Z\",\"txEndTime\":\"2021-06-30T11:52:25Z\",\"errorMessage\":\"qjhqjbas\",\"maximumElevationDegrees\":92.33378,\"startAzimuthDegrees\":21.614403,\"endAzimuthDegrees\":48.216724,\"groundStationName\":\"lngsntnbybkzgcwr\",\"startElevationDegrees\":77.0421,\"endElevationDegrees\":99.26511,\"antennaConfiguration\":{\"destinationIp\":\"ljdousk\",\"sourceIps\":[\"kocrcjdkwtnhx\",\"njbiksqrglssain\",\"p\"]},\"contactProfile\":{\"id\":\"wnzlljfmppeeb\"}},\"id\":\"gxsabkyq\",\"name\":\"uujitcjc\",\"type\":\"dzevndhkrw\"},{\"properties\":{\"provisioningState\":\"succeeded\",\"status\":\"scheduled\",\"reservationStartTime\":\"2021-12-05T19:33:11Z\",\"reservationEndTime\":\"2021-05-23T21:44:39Z\",\"rxStartTime\":\"2021-06-29T12:45:09Z\",\"rxEndTime\":\"2021-05-04T09:53:42Z\",\"txStartTime\":\"2021-09-26T08:04:44Z\",\"txEndTime\":\"2021-07-05T21:18:02Z\",\"errorMessage\":\"eusnhutj\",\"maximumElevationDegrees\":87.67903,\"startAzimuthDegrees\":9.114658,\"endAzimuthDegrees\":95.85893,\"groundStationName\":\"hugjzzdatqxhoc\",\"startElevationDegrees\":25.122803,\"endElevationDegrees\":56.39705,\"antennaConfiguration\":{\"destinationIp\":\"phut\",\"sourceIps\":[\"dvkaozw\"]},\"contactProfile\":{\"id\":\"i\"}},\"id\":\"yhxhu\",\"name\":\"okftyxolniwpwcuk\",\"type\":\"fkgiawxk\"}],\"nextLink\":\"ypl\"}") - .toObject(ContactListResult.class); - Assertions.assertEquals(ContactsPropertiesProvisioningState.CANCELED, model.value().get(0).provisioningState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-27T12:55:33Z"), - model.value().get(0).reservationStartTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-24T03:44:15Z"), - model.value().get(0).reservationEndTime()); - Assertions.assertEquals("lngsntnbybkzgcwr", model.value().get(0).groundStationName()); - Assertions.assertEquals("wnzlljfmppeeb", model.value().get(0).contactProfile().id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContactListResult model = new ContactListResult().withValue(Arrays.asList( - new ContactInner().withProvisioningState(ContactsPropertiesProvisioningState.CANCELED) - .withReservationStartTime(OffsetDateTime.parse("2021-04-27T12:55:33Z")) - .withReservationEndTime(OffsetDateTime.parse("2021-04-24T03:44:15Z")) - .withGroundStationName("lngsntnbybkzgcwr") - .withContactProfile(new ContactsPropertiesContactProfile().withId("wnzlljfmppeeb")), - new ContactInner().withProvisioningState(ContactsPropertiesProvisioningState.SUCCEEDED) - .withReservationStartTime(OffsetDateTime.parse("2021-12-05T19:33:11Z")) - .withReservationEndTime(OffsetDateTime.parse("2021-05-23T21:44:39Z")) - .withGroundStationName("hugjzzdatqxhoc") - .withContactProfile(new ContactsPropertiesContactProfile().withId("i")))); - model = BinaryData.fromObject(model).toObject(ContactListResult.class); - Assertions.assertEquals(ContactsPropertiesProvisioningState.CANCELED, model.value().get(0).provisioningState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-27T12:55:33Z"), - model.value().get(0).reservationStartTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-24T03:44:15Z"), - model.value().get(0).reservationEndTime()); - Assertions.assertEquals("lngsntnbybkzgcwr", model.value().get(0).groundStationName()); - Assertions.assertEquals("wnzlljfmppeeb", model.value().get(0).contactProfile().id()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactParametersContactProfileTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactParametersContactProfileTests.java deleted file mode 100644 index 23cef27cf1ba..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactParametersContactProfileTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.ContactParametersContactProfile; -import org.junit.jupiter.api.Assertions; - -public final class ContactParametersContactProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContactParametersContactProfile model - = BinaryData.fromString("{\"id\":\"ckyfih\"}").toObject(ContactParametersContactProfile.class); - Assertions.assertEquals("ckyfih", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContactParametersContactProfile model = new ContactParametersContactProfile().withId("ckyfih"); - model = BinaryData.fromObject(model).toObject(ContactParametersContactProfile.class); - Assertions.assertEquals("ckyfih", model.id()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactParametersTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactParametersTests.java deleted file mode 100644 index dda15b298059..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactParametersTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.ContactParameters; -import com.azure.resourcemanager.orbital.models.ContactParametersContactProfile; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class ContactParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContactParameters model = BinaryData.fromString( - "{\"contactProfile\":{\"id\":\"prwzwbnguitnwui\"},\"groundStationName\":\"gazxuf\",\"startTime\":\"2020-12-27T04:43:40Z\",\"endTime\":\"2021-07-01T16:43:11Z\"}") - .toObject(ContactParameters.class); - Assertions.assertEquals("prwzwbnguitnwui", model.contactProfile().id()); - Assertions.assertEquals("gazxuf", model.groundStationName()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-27T04:43:40Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-01T16:43:11Z"), model.endTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContactParameters model = new ContactParameters() - .withContactProfile(new ContactParametersContactProfile().withId("prwzwbnguitnwui")) - .withGroundStationName("gazxuf") - .withStartTime(OffsetDateTime.parse("2020-12-27T04:43:40Z")) - .withEndTime(OffsetDateTime.parse("2021-07-01T16:43:11Z")); - model = BinaryData.fromObject(model).toObject(ContactParameters.class); - Assertions.assertEquals("prwzwbnguitnwui", model.contactProfile().id()); - Assertions.assertEquals("gazxuf", model.groundStationName()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-27T04:43:40Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-01T16:43:11Z"), model.endTime()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfileInnerTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfileInnerTests.java deleted file mode 100644 index c2af54285494..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfileInnerTests.java +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.fluent.models.ContactProfileInner; -import com.azure.resourcemanager.orbital.models.AutoTrackingConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfileLink; -import com.azure.resourcemanager.orbital.models.ContactProfileLinkChannel; -import com.azure.resourcemanager.orbital.models.ContactProfileThirdPartyConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesNetworkConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesProvisioningState; -import com.azure.resourcemanager.orbital.models.Direction; -import com.azure.resourcemanager.orbital.models.EndPoint; -import com.azure.resourcemanager.orbital.models.Polarization; -import com.azure.resourcemanager.orbital.models.Protocol; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ContactProfileInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContactProfileInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"creating\",\"minimumViableContactDuration\":\"pgrjbz\",\"minimumElevationDegrees\":83.16138,\"autoTrackingConfiguration\":\"disabled\",\"eventHubUri\":\"vsnb\",\"networkConfiguration\":{\"subnetId\":\"xqabnmocpcysh\"},\"thirdPartyConfigurations\":[{\"providerName\":\"afbljjgpbtoqcjmk\",\"missionConfiguration\":\"javbqidtqajz\"}],\"links\":[{\"name\":\"l\",\"polarization\":\"linearVertical\",\"direction\":\"Uplink\",\"gainOverTemperature\":78.68875,\"eirpdBW\":85.05088,\"channels\":[{\"name\":\"khbzhfepgzg\",\"centerFrequencyMHz\":4.900825,\"bandwidthMHz\":53.090946,\"endPoint\":{\"ipAddress\":\"zloc\",\"endPointName\":\"scpai\",\"port\":\"rhhbcs\",\"protocol\":\"TCP\"},\"modulationConfiguration\":\"mmajtjaodx\",\"demodulationConfiguration\":\"nbdxk\",\"encodingConfiguration\":\"xo\",\"decodingConfiguration\":\"jionpimexgstxgc\"},{\"name\":\"odgmaajrmvdjwz\",\"centerFrequencyMHz\":79.743835,\"bandwidthMHz\":89.702286,\"endPoint\":{\"ipAddress\":\"vmclw\",\"endPointName\":\"ijcoejctb\",\"port\":\"aqsqsycbkbfk\",\"protocol\":\"UDP\"},\"modulationConfiguration\":\"dkexxppofm\",\"demodulationConfiguration\":\"x\",\"encodingConfiguration\":\"jpgd\",\"decodingConfiguration\":\"ocjjxhvpmouexh\"}]},{\"name\":\"zxibqeoj\",\"polarization\":\"linearVertical\",\"direction\":\"Downlink\",\"gainOverTemperature\":96.80261,\"eirpdBW\":52.783543,\"channels\":[{\"name\":\"ntwndeicbtwnpzao\",\"centerFrequencyMHz\":82.38834,\"bandwidthMHz\":80.9701,\"endPoint\":{\"ipAddress\":\"hrhcffcyddglmjth\",\"endPointName\":\"qkwpyeicxmqc\",\"port\":\"wqvhkhixuigdt\",\"protocol\":\"TCP\"},\"modulationConfiguration\":\"objoghmewu\",\"demodulationConfiguration\":\"a\",\"encodingConfiguration\":\"rzayv\",\"decodingConfiguration\":\"pgvdf\"},{\"name\":\"iotkftutqxl\",\"centerFrequencyMHz\":86.21241,\"bandwidthMHz\":71.90909,\"endPoint\":{\"ipAddress\":\"lefgugnxk\",\"endPointName\":\"xdqmidtthzrvqdra\",\"port\":\"hjybigehoqfbo\",\"protocol\":\"TCP\"},\"modulationConfiguration\":\"anyktzlcuiywg\",\"demodulationConfiguration\":\"wgndrvynhzgpp\",\"encodingConfiguration\":\"cgyncocpecf\",\"decodingConfiguration\":\"mcoo\"},{\"name\":\"sxlzevgbmqj\",\"centerFrequencyMHz\":53.38513,\"bandwidthMHz\":37.101418,\"endPoint\":{\"ipAddress\":\"c\",\"endPointName\":\"pmivkwlzu\",\"port\":\"ccfwnfnbacfion\",\"protocol\":\"UDP\"},\"modulationConfiguration\":\"x\",\"demodulationConfiguration\":\"qgtz\",\"encodingConfiguration\":\"pnqbqqwxrjfe\",\"decodingConfiguration\":\"lnwsubisn\"}]},{\"name\":\"ampmngnz\",\"polarization\":\"RHCP\",\"direction\":\"Downlink\",\"gainOverTemperature\":60.04183,\"eirpdBW\":23.731243,\"channels\":[{\"name\":\"chcbonqvpkvlrxnj\",\"centerFrequencyMHz\":14.8004,\"bandwidthMHz\":34.601463,\"endPoint\":{\"ipAddress\":\"eipheoflokeyy\",\"endPointName\":\"enjbdlwtgrhp\",\"port\":\"jp\",\"protocol\":\"UDP\"},\"modulationConfiguration\":\"asxazjpqyegualhb\",\"demodulationConfiguration\":\"hejjz\",\"encodingConfiguration\":\"dudgwdslfhot\",\"decodingConfiguration\":\"cynpwlbjnp\"},{\"name\":\"acfta\",\"centerFrequencyMHz\":63.682568,\"bandwidthMHz\":1.3006687,\"endPoint\":{\"ipAddress\":\"xnltyfsoppu\",\"endPointName\":\"uesnzwdejbavo\",\"port\":\"xzdmohctb\",\"protocol\":\"TCP\"},\"modulationConfiguration\":\"dwxdndnv\",\"demodulationConfiguration\":\"gujjugwdkcglh\",\"encodingConfiguration\":\"azjdyggd\",\"decodingConfiguration\":\"ixhbkuofqweykhm\"},{\"name\":\"n\",\"centerFrequencyMHz\":37.98073,\"bandwidthMHz\":45.722916,\"endPoint\":{\"ipAddress\":\"yexfwh\",\"endPointName\":\"bcibvyvdcsitynn\",\"port\":\"amdecte\",\"protocol\":\"TCP\"},\"modulationConfiguration\":\"qsc\",\"demodulationConfiguration\":\"ypvhezrkg\",\"encodingConfiguration\":\"c\",\"decodingConfiguration\":\"efovgmk\"},{\"name\":\"sle\",\"centerFrequencyMHz\":38.220562,\"bandwidthMHz\":97.29868,\"endPoint\":{\"ipAddress\":\"xyqj\",\"endPointName\":\"k\",\"port\":\"attpngjcrcczsq\",\"protocol\":\"TCP\"},\"modulationConfiguration\":\"vmdajvnysou\",\"demodulationConfiguration\":\"e\",\"encodingConfiguration\":\"noae\",\"decodingConfiguration\":\"fhyhltrpmopjmcma\"}]}]},\"location\":\"okth\",\"tags\":{\"xodpuozmyzydagfu\":\"uaodsfcpk\",\"dxwzywqsmbsurexi\":\"xbezyiuokktwh\"},\"id\":\"o\",\"name\":\"yocf\",\"type\":\"fksymddystki\"}") - .toObject(ContactProfileInner.class); - Assertions.assertEquals("okth", model.location()); - Assertions.assertEquals("uaodsfcpk", model.tags().get("xodpuozmyzydagfu")); - Assertions.assertEquals(ContactProfilesPropertiesProvisioningState.CREATING, model.provisioningState()); - Assertions.assertEquals("pgrjbz", model.minimumViableContactDuration()); - Assertions.assertEquals(83.16138F, model.minimumElevationDegrees()); - Assertions.assertEquals(AutoTrackingConfiguration.DISABLED, model.autoTrackingConfiguration()); - Assertions.assertEquals("vsnb", model.eventHubUri()); - Assertions.assertEquals("xqabnmocpcysh", model.networkConfiguration().subnetId()); - Assertions.assertEquals("afbljjgpbtoqcjmk", model.thirdPartyConfigurations().get(0).providerName()); - Assertions.assertEquals("javbqidtqajz", model.thirdPartyConfigurations().get(0).missionConfiguration()); - Assertions.assertEquals("l", model.links().get(0).name()); - Assertions.assertEquals(Polarization.LINEAR_VERTICAL, model.links().get(0).polarization()); - Assertions.assertEquals(Direction.UPLINK, model.links().get(0).direction()); - Assertions.assertEquals(78.68875F, model.links().get(0).gainOverTemperature()); - Assertions.assertEquals(85.05088F, model.links().get(0).eirpdBW()); - Assertions.assertEquals("khbzhfepgzg", model.links().get(0).channels().get(0).name()); - Assertions.assertEquals(4.900825f, model.links().get(0).channels().get(0).centerFrequencyMHz()); - Assertions.assertEquals(53.090946f, model.links().get(0).channels().get(0).bandwidthMHz()); - Assertions.assertEquals("zloc", model.links().get(0).channels().get(0).endPoint().ipAddress()); - Assertions.assertEquals("scpai", model.links().get(0).channels().get(0).endPoint().endPointName()); - Assertions.assertEquals("rhhbcs", model.links().get(0).channels().get(0).endPoint().port()); - Assertions.assertEquals(Protocol.TCP, model.links().get(0).channels().get(0).endPoint().protocol()); - Assertions.assertEquals("mmajtjaodx", model.links().get(0).channels().get(0).modulationConfiguration()); - Assertions.assertEquals("nbdxk", model.links().get(0).channels().get(0).demodulationConfiguration()); - Assertions.assertEquals("xo", model.links().get(0).channels().get(0).encodingConfiguration()); - Assertions.assertEquals("jionpimexgstxgc", model.links().get(0).channels().get(0).decodingConfiguration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContactProfileInner model = new ContactProfileInner().withLocation("okth") - .withTags(mapOf("xodpuozmyzydagfu", "uaodsfcpk", "dxwzywqsmbsurexi", "xbezyiuokktwh")) - .withProvisioningState(ContactProfilesPropertiesProvisioningState.CREATING) - .withMinimumViableContactDuration("pgrjbz") - .withMinimumElevationDegrees(83.16138F) - .withAutoTrackingConfiguration(AutoTrackingConfiguration.DISABLED) - .withEventHubUri("vsnb") - .withNetworkConfiguration(new ContactProfilesPropertiesNetworkConfiguration().withSubnetId("xqabnmocpcysh")) - .withThirdPartyConfigurations( - Arrays.asList(new ContactProfileThirdPartyConfiguration().withProviderName("afbljjgpbtoqcjmk") - .withMissionConfiguration("javbqidtqajz"))) - .withLinks(Arrays.asList( - new ContactProfileLink().withName("l") - .withPolarization(Polarization.LINEAR_VERTICAL) - .withDirection(Direction.UPLINK) - .withGainOverTemperature(78.68875F) - .withEirpdBW(85.05088F) - .withChannels(Arrays.asList( - new ContactProfileLinkChannel().withName("khbzhfepgzg") - .withCenterFrequencyMHz(4.900825f) - .withBandwidthMHz(53.090946f) - .withEndPoint(new EndPoint().withIpAddress("zloc") - .withEndPointName("scpai") - .withPort("rhhbcs") - .withProtocol(Protocol.TCP)) - .withModulationConfiguration("mmajtjaodx") - .withDemodulationConfiguration("nbdxk") - .withEncodingConfiguration("xo") - .withDecodingConfiguration("jionpimexgstxgc"), - new ContactProfileLinkChannel().withName("odgmaajrmvdjwz") - .withCenterFrequencyMHz(79.743835f) - .withBandwidthMHz(89.702286f) - .withEndPoint(new EndPoint().withIpAddress("vmclw") - .withEndPointName("ijcoejctb") - .withPort("aqsqsycbkbfk") - .withProtocol(Protocol.UDP)) - .withModulationConfiguration("dkexxppofm") - .withDemodulationConfiguration("x") - .withEncodingConfiguration("jpgd") - .withDecodingConfiguration("ocjjxhvpmouexh"))), - new ContactProfileLink().withName("zxibqeoj") - .withPolarization(Polarization.LINEAR_VERTICAL) - .withDirection(Direction.DOWNLINK) - .withGainOverTemperature(96.80261F) - .withEirpdBW(52.783543F) - .withChannels(Arrays.asList( - new ContactProfileLinkChannel().withName("ntwndeicbtwnpzao") - .withCenterFrequencyMHz(82.38834f) - .withBandwidthMHz(80.9701f) - .withEndPoint(new EndPoint().withIpAddress("hrhcffcyddglmjth") - .withEndPointName("qkwpyeicxmqc") - .withPort("wqvhkhixuigdt") - .withProtocol(Protocol.TCP)) - .withModulationConfiguration("objoghmewu") - .withDemodulationConfiguration("a") - .withEncodingConfiguration("rzayv") - .withDecodingConfiguration("pgvdf"), - new ContactProfileLinkChannel().withName("iotkftutqxl") - .withCenterFrequencyMHz(86.21241f) - .withBandwidthMHz(71.90909f) - .withEndPoint(new EndPoint().withIpAddress("lefgugnxk") - .withEndPointName("xdqmidtthzrvqdra") - .withPort("hjybigehoqfbo") - .withProtocol(Protocol.TCP)) - .withModulationConfiguration("anyktzlcuiywg") - .withDemodulationConfiguration("wgndrvynhzgpp") - .withEncodingConfiguration("cgyncocpecf") - .withDecodingConfiguration("mcoo"), - new ContactProfileLinkChannel().withName("sxlzevgbmqj") - .withCenterFrequencyMHz(53.38513f) - .withBandwidthMHz(37.101418f) - .withEndPoint(new EndPoint().withIpAddress("c") - .withEndPointName("pmivkwlzu") - .withPort("ccfwnfnbacfion") - .withProtocol(Protocol.UDP)) - .withModulationConfiguration("x") - .withDemodulationConfiguration("qgtz") - .withEncodingConfiguration("pnqbqqwxrjfe") - .withDecodingConfiguration("lnwsubisn"))), - new ContactProfileLink().withName("ampmngnz") - .withPolarization(Polarization.RHCP) - .withDirection(Direction.DOWNLINK) - .withGainOverTemperature(60.04183F) - .withEirpdBW(23.731243F) - .withChannels(Arrays.asList( - new ContactProfileLinkChannel().withName("chcbonqvpkvlrxnj") - .withCenterFrequencyMHz(14.8004f) - .withBandwidthMHz(34.601463f) - .withEndPoint(new EndPoint().withIpAddress("eipheoflokeyy") - .withEndPointName("enjbdlwtgrhp") - .withPort("jp") - .withProtocol(Protocol.UDP)) - .withModulationConfiguration("asxazjpqyegualhb") - .withDemodulationConfiguration("hejjz") - .withEncodingConfiguration("dudgwdslfhot") - .withDecodingConfiguration("cynpwlbjnp"), - new ContactProfileLinkChannel().withName("acfta") - .withCenterFrequencyMHz(63.682568f) - .withBandwidthMHz(1.3006687f) - .withEndPoint(new EndPoint().withIpAddress("xnltyfsoppu") - .withEndPointName("uesnzwdejbavo") - .withPort("xzdmohctb") - .withProtocol(Protocol.TCP)) - .withModulationConfiguration("dwxdndnv") - .withDemodulationConfiguration("gujjugwdkcglh") - .withEncodingConfiguration("azjdyggd") - .withDecodingConfiguration("ixhbkuofqweykhm"), - new ContactProfileLinkChannel().withName("n") - .withCenterFrequencyMHz(37.98073f) - .withBandwidthMHz(45.722916f) - .withEndPoint(new EndPoint().withIpAddress("yexfwh") - .withEndPointName("bcibvyvdcsitynn") - .withPort("amdecte") - .withProtocol(Protocol.TCP)) - .withModulationConfiguration("qsc") - .withDemodulationConfiguration("ypvhezrkg") - .withEncodingConfiguration("c") - .withDecodingConfiguration("efovgmk"), - new ContactProfileLinkChannel().withName("sle") - .withCenterFrequencyMHz(38.220562f) - .withBandwidthMHz(97.29868f) - .withEndPoint(new EndPoint().withIpAddress("xyqj") - .withEndPointName("k") - .withPort("attpngjcrcczsq") - .withProtocol(Protocol.TCP)) - .withModulationConfiguration("vmdajvnysou") - .withDemodulationConfiguration("e") - .withEncodingConfiguration("noae") - .withDecodingConfiguration("fhyhltrpmopjmcma"))))); - model = BinaryData.fromObject(model).toObject(ContactProfileInner.class); - Assertions.assertEquals("okth", model.location()); - Assertions.assertEquals("uaodsfcpk", model.tags().get("xodpuozmyzydagfu")); - Assertions.assertEquals(ContactProfilesPropertiesProvisioningState.CREATING, model.provisioningState()); - Assertions.assertEquals("pgrjbz", model.minimumViableContactDuration()); - Assertions.assertEquals(83.16138F, model.minimumElevationDegrees()); - Assertions.assertEquals(AutoTrackingConfiguration.DISABLED, model.autoTrackingConfiguration()); - Assertions.assertEquals("vsnb", model.eventHubUri()); - Assertions.assertEquals("xqabnmocpcysh", model.networkConfiguration().subnetId()); - Assertions.assertEquals("afbljjgpbtoqcjmk", model.thirdPartyConfigurations().get(0).providerName()); - Assertions.assertEquals("javbqidtqajz", model.thirdPartyConfigurations().get(0).missionConfiguration()); - Assertions.assertEquals("l", model.links().get(0).name()); - Assertions.assertEquals(Polarization.LINEAR_VERTICAL, model.links().get(0).polarization()); - Assertions.assertEquals(Direction.UPLINK, model.links().get(0).direction()); - Assertions.assertEquals(78.68875F, model.links().get(0).gainOverTemperature()); - Assertions.assertEquals(85.05088F, model.links().get(0).eirpdBW()); - Assertions.assertEquals("khbzhfepgzg", model.links().get(0).channels().get(0).name()); - Assertions.assertEquals(4.900825f, model.links().get(0).channels().get(0).centerFrequencyMHz()); - Assertions.assertEquals(53.090946f, model.links().get(0).channels().get(0).bandwidthMHz()); - Assertions.assertEquals("zloc", model.links().get(0).channels().get(0).endPoint().ipAddress()); - Assertions.assertEquals("scpai", model.links().get(0).channels().get(0).endPoint().endPointName()); - Assertions.assertEquals("rhhbcs", model.links().get(0).channels().get(0).endPoint().port()); - Assertions.assertEquals(Protocol.TCP, model.links().get(0).channels().get(0).endPoint().protocol()); - Assertions.assertEquals("mmajtjaodx", model.links().get(0).channels().get(0).modulationConfiguration()); - Assertions.assertEquals("nbdxk", model.links().get(0).channels().get(0).demodulationConfiguration()); - Assertions.assertEquals("xo", model.links().get(0).channels().get(0).encodingConfiguration()); - Assertions.assertEquals("jionpimexgstxgc", model.links().get(0).channels().get(0).decodingConfiguration()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfileLinkChannelTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfileLinkChannelTests.java deleted file mode 100644 index 70c7b70e503e..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfileLinkChannelTests.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.ContactProfileLinkChannel; -import com.azure.resourcemanager.orbital.models.EndPoint; -import com.azure.resourcemanager.orbital.models.Protocol; -import org.junit.jupiter.api.Assertions; - -public final class ContactProfileLinkChannelTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContactProfileLinkChannel model = BinaryData.fromString( - "{\"name\":\"ivetvtcq\",\"centerFrequencyMHz\":21.629738,\"bandwidthMHz\":17.011059,\"endPoint\":{\"ipAddress\":\"doqmcbxvwvxys\",\"endPointName\":\"qbhsfxobl\",\"port\":\"tkblmpewww\",\"protocol\":\"UDP\"},\"modulationConfiguration\":\"rvrnsvshqjohxc\",\"demodulationConfiguration\":\"bfovasrruvwbhsq\",\"encodingConfiguration\":\"ubcgjbirxb\",\"decodingConfiguration\":\"bsrfbj\"}") - .toObject(ContactProfileLinkChannel.class); - Assertions.assertEquals("ivetvtcq", model.name()); - Assertions.assertEquals(21.629738f, model.centerFrequencyMHz()); - Assertions.assertEquals(17.011059f, model.bandwidthMHz()); - Assertions.assertEquals("doqmcbxvwvxys", model.endPoint().ipAddress()); - Assertions.assertEquals("qbhsfxobl", model.endPoint().endPointName()); - Assertions.assertEquals("tkblmpewww", model.endPoint().port()); - Assertions.assertEquals(Protocol.UDP, model.endPoint().protocol()); - Assertions.assertEquals("rvrnsvshqjohxc", model.modulationConfiguration()); - Assertions.assertEquals("bfovasrruvwbhsq", model.demodulationConfiguration()); - Assertions.assertEquals("ubcgjbirxb", model.encodingConfiguration()); - Assertions.assertEquals("bsrfbj", model.decodingConfiguration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContactProfileLinkChannel model = new ContactProfileLinkChannel().withName("ivetvtcq") - .withCenterFrequencyMHz(21.629738f) - .withBandwidthMHz(17.011059f) - .withEndPoint(new EndPoint().withIpAddress("doqmcbxvwvxys") - .withEndPointName("qbhsfxobl") - .withPort("tkblmpewww") - .withProtocol(Protocol.UDP)) - .withModulationConfiguration("rvrnsvshqjohxc") - .withDemodulationConfiguration("bfovasrruvwbhsq") - .withEncodingConfiguration("ubcgjbirxb") - .withDecodingConfiguration("bsrfbj"); - model = BinaryData.fromObject(model).toObject(ContactProfileLinkChannel.class); - Assertions.assertEquals("ivetvtcq", model.name()); - Assertions.assertEquals(21.629738f, model.centerFrequencyMHz()); - Assertions.assertEquals(17.011059f, model.bandwidthMHz()); - Assertions.assertEquals("doqmcbxvwvxys", model.endPoint().ipAddress()); - Assertions.assertEquals("qbhsfxobl", model.endPoint().endPointName()); - Assertions.assertEquals("tkblmpewww", model.endPoint().port()); - Assertions.assertEquals(Protocol.UDP, model.endPoint().protocol()); - Assertions.assertEquals("rvrnsvshqjohxc", model.modulationConfiguration()); - Assertions.assertEquals("bfovasrruvwbhsq", model.demodulationConfiguration()); - Assertions.assertEquals("ubcgjbirxb", model.encodingConfiguration()); - Assertions.assertEquals("bsrfbj", model.decodingConfiguration()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfileLinkTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfileLinkTests.java deleted file mode 100644 index 94e126bc4ee4..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfileLinkTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.ContactProfileLink; -import com.azure.resourcemanager.orbital.models.ContactProfileLinkChannel; -import com.azure.resourcemanager.orbital.models.Direction; -import com.azure.resourcemanager.orbital.models.EndPoint; -import com.azure.resourcemanager.orbital.models.Polarization; -import com.azure.resourcemanager.orbital.models.Protocol; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ContactProfileLinkTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContactProfileLink model = BinaryData.fromString( - "{\"name\":\"qrhhu\",\"polarization\":\"LHCP\",\"direction\":\"Downlink\",\"gainOverTemperature\":36.1724,\"eirpdBW\":30.051893,\"channels\":[{\"name\":\"qxolzdahzx\",\"centerFrequencyMHz\":5.8805466,\"bandwidthMHz\":68.45818,\"endPoint\":{\"ipAddress\":\"bgbkdmoizpost\",\"endPointName\":\"grcfb\",\"port\":\"nrmfqjhhk\",\"protocol\":\"UDP\"},\"modulationConfiguration\":\"vjymjhxxjyngud\",\"demodulationConfiguration\":\"krtswbxqz\",\"encodingConfiguration\":\"zjf\",\"decodingConfiguration\":\"vjfdx\"}]}") - .toObject(ContactProfileLink.class); - Assertions.assertEquals("qrhhu", model.name()); - Assertions.assertEquals(Polarization.LHCP, model.polarization()); - Assertions.assertEquals(Direction.DOWNLINK, model.direction()); - Assertions.assertEquals(36.1724F, model.gainOverTemperature()); - Assertions.assertEquals(30.051893F, model.eirpdBW()); - Assertions.assertEquals("qxolzdahzx", model.channels().get(0).name()); - Assertions.assertEquals(5.8805466f, model.channels().get(0).centerFrequencyMHz()); - Assertions.assertEquals(68.45818f, model.channels().get(0).bandwidthMHz()); - Assertions.assertEquals("bgbkdmoizpost", model.channels().get(0).endPoint().ipAddress()); - Assertions.assertEquals("grcfb", model.channels().get(0).endPoint().endPointName()); - Assertions.assertEquals("nrmfqjhhk", model.channels().get(0).endPoint().port()); - Assertions.assertEquals(Protocol.UDP, model.channels().get(0).endPoint().protocol()); - Assertions.assertEquals("vjymjhxxjyngud", model.channels().get(0).modulationConfiguration()); - Assertions.assertEquals("krtswbxqz", model.channels().get(0).demodulationConfiguration()); - Assertions.assertEquals("zjf", model.channels().get(0).encodingConfiguration()); - Assertions.assertEquals("vjfdx", model.channels().get(0).decodingConfiguration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContactProfileLink model = new ContactProfileLink().withName("qrhhu") - .withPolarization(Polarization.LHCP) - .withDirection(Direction.DOWNLINK) - .withGainOverTemperature(36.1724F) - .withEirpdBW(30.051893F) - .withChannels(Arrays.asList(new ContactProfileLinkChannel().withName("qxolzdahzx") - .withCenterFrequencyMHz(5.8805466f) - .withBandwidthMHz(68.45818f) - .withEndPoint(new EndPoint().withIpAddress("bgbkdmoizpost") - .withEndPointName("grcfb") - .withPort("nrmfqjhhk") - .withProtocol(Protocol.UDP)) - .withModulationConfiguration("vjymjhxxjyngud") - .withDemodulationConfiguration("krtswbxqz") - .withEncodingConfiguration("zjf") - .withDecodingConfiguration("vjfdx"))); - model = BinaryData.fromObject(model).toObject(ContactProfileLink.class); - Assertions.assertEquals("qrhhu", model.name()); - Assertions.assertEquals(Polarization.LHCP, model.polarization()); - Assertions.assertEquals(Direction.DOWNLINK, model.direction()); - Assertions.assertEquals(36.1724F, model.gainOverTemperature()); - Assertions.assertEquals(30.051893F, model.eirpdBW()); - Assertions.assertEquals("qxolzdahzx", model.channels().get(0).name()); - Assertions.assertEquals(5.8805466f, model.channels().get(0).centerFrequencyMHz()); - Assertions.assertEquals(68.45818f, model.channels().get(0).bandwidthMHz()); - Assertions.assertEquals("bgbkdmoizpost", model.channels().get(0).endPoint().ipAddress()); - Assertions.assertEquals("grcfb", model.channels().get(0).endPoint().endPointName()); - Assertions.assertEquals("nrmfqjhhk", model.channels().get(0).endPoint().port()); - Assertions.assertEquals(Protocol.UDP, model.channels().get(0).endPoint().protocol()); - Assertions.assertEquals("vjymjhxxjyngud", model.channels().get(0).modulationConfiguration()); - Assertions.assertEquals("krtswbxqz", model.channels().get(0).demodulationConfiguration()); - Assertions.assertEquals("zjf", model.channels().get(0).encodingConfiguration()); - Assertions.assertEquals("vjfdx", model.channels().get(0).decodingConfiguration()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfileListResultTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfileListResultTests.java deleted file mode 100644 index 6b61def4a2b9..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfileListResultTests.java +++ /dev/null @@ -1,418 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.fluent.models.ContactProfileInner; -import com.azure.resourcemanager.orbital.models.AutoTrackingConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfileLink; -import com.azure.resourcemanager.orbital.models.ContactProfileLinkChannel; -import com.azure.resourcemanager.orbital.models.ContactProfileListResult; -import com.azure.resourcemanager.orbital.models.ContactProfileThirdPartyConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesNetworkConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesProvisioningState; -import com.azure.resourcemanager.orbital.models.Direction; -import com.azure.resourcemanager.orbital.models.EndPoint; -import com.azure.resourcemanager.orbital.models.Polarization; -import com.azure.resourcemanager.orbital.models.Protocol; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ContactProfileListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContactProfileListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"succeeded\",\"minimumViableContactDuration\":\"ujmkcjhwqy\",\"minimumElevationDegrees\":1.7570734,\"autoTrackingConfiguration\":\"disabled\",\"eventHubUri\":\"wj\",\"networkConfiguration\":{\"subnetId\":\"wgdrjervnaenqp\"},\"thirdPartyConfigurations\":[{\"providerName\":\"ndoygmifthnzdnd\",\"missionConfiguration\":\"l\"},{\"providerName\":\"nayqi\",\"missionConfiguration\":\"ynduha\"},{\"providerName\":\"hqlkthumaqo\",\"missionConfiguration\":\"bgycduiertgccym\"},{\"providerName\":\"aolps\",\"missionConfiguration\":\"lqlfm\"}],\"links\":[{\"name\":\"n\",\"polarization\":\"LHCP\",\"direction\":\"Downlink\",\"gainOverTemperature\":55.65765,\"eirpdBW\":81.210945,\"channels\":[{\"name\":\"iydmcwyhzdxs\",\"centerFrequencyMHz\":80.603836,\"bandwidthMHz\":20.36894,\"endPoint\":{\"ipAddress\":\"bzmnvdfznud\",\"endPointName\":\"od\",\"port\":\"xzb\",\"protocol\":\"UDP\"}},{\"name\":\"blylpstdbh\",\"centerFrequencyMHz\":21.126366,\"bandwidthMHz\":76.3956,\"endPoint\":{\"ipAddress\":\"rzdzucerscdnt\",\"endPointName\":\"evfiwjmygt\",\"port\":\"sslswtmweriof\",\"protocol\":\"TCP\"}},{\"name\":\"yqsemwa\",\"centerFrequencyMHz\":5.657935,\"bandwidthMHz\":18.444378,\"endPoint\":{\"ipAddress\":\"tshhszhedp\",\"endPointName\":\"vwiwubmwmbesld\",\"port\":\"k\",\"protocol\":\"UDP\"}},{\"name\":\"tppjflcx\",\"centerFrequencyMHz\":80.7271,\"bandwidthMHz\":66.58158,\"endPoint\":{\"ipAddress\":\"okonzmnsikvmkqz\",\"endPointName\":\"qqkdltfzxmhhvhgu\",\"port\":\"eodkwobda\",\"protocol\":\"UDP\"}}]},{\"name\":\"tibqdxbxwakb\",\"polarization\":\"linearHorizontal\",\"direction\":\"Uplink\",\"gainOverTemperature\":69.47182,\"eirpdBW\":79.54939,\"channels\":[{\"name\":\"zgx\",\"centerFrequencyMHz\":85.23063,\"bandwidthMHz\":22.702295,\"endPoint\":{\"ipAddress\":\"iplbpodxunkbebxm\",\"endPointName\":\"byyntwlrbqt\",\"port\":\"oievseotgqrlltm\",\"protocol\":\"UDP\"}},{\"name\":\"lauwzizxbmpgcjef\",\"centerFrequencyMHz\":95.06782,\"bandwidthMHz\":21.135498,\"endPoint\":{\"ipAddress\":\"uvpb\",\"endPointName\":\"tdum\",\"port\":\"rp\",\"protocol\":\"TCP\"}},{\"name\":\"ebmnzbtbhjpglk\",\"centerFrequencyMHz\":82.34188,\"bandwidthMHz\":49.83795,\"endPoint\":{\"ipAddress\":\"hdneuelfph\",\"endPointName\":\"dyhtozfikdowwquu\",\"port\":\"xzxcl\",\"protocol\":\"TCP\"}}]},{\"name\":\"thhqzonosggbh\",\"polarization\":\"LHCP\",\"direction\":\"Downlink\",\"gainOverTemperature\":61.219753,\"eirpdBW\":33.099705,\"channels\":[{\"name\":\"n\",\"centerFrequencyMHz\":65.78154,\"bandwidthMHz\":25.078642,\"endPoint\":{\"ipAddress\":\"jutiiswacff\",\"endPointName\":\"dkzzewkfvhqcrail\",\"port\":\"pnppfuf\",\"protocol\":\"UDP\"}},{\"name\":\"wdmhdlxyjrxs\",\"centerFrequencyMHz\":94.25893,\"bandwidthMHz\":37.06115,\"endPoint\":{\"ipAddress\":\"fcnihgwq\",\"endPointName\":\"pnedgf\",\"port\":\"cvkcvqvpkeqdcv\",\"protocol\":\"TCP\"}},{\"name\":\"hvoodsotbobzd\",\"centerFrequencyMHz\":29.276281,\"bandwidthMHz\":26.7008,\"endPoint\":{\"ipAddress\":\"j\",\"endPointName\":\"vnhdldwmgxcxr\",\"port\":\"lpmutwuoegrpkhj\",\"protocol\":\"TCP\"}},{\"name\":\"iyq\",\"centerFrequencyMHz\":99.57627,\"bandwidthMHz\":28.484118,\"endPoint\":{\"ipAddress\":\"i\",\"endPointName\":\"pdggkzzlvm\",\"port\":\"mpaxmodfvuefywsb\",\"protocol\":\"TCP\"}}]}]},\"location\":\"mwyhr\",\"tags\":{\"yzvqt\":\"yftaakcpw\",\"zksmondj\":\"nubexk\"},\"id\":\"quxvypomgkop\",\"name\":\"whojvp\",\"type\":\"jqg\"},{\"properties\":{\"provisioningState\":\"failed\",\"minimumViableContactDuration\":\"ocmbqfqvmkcxoza\",\"minimumElevationDegrees\":56.86097,\"autoTrackingConfiguration\":\"disabled\",\"eventHubUri\":\"prglya\",\"networkConfiguration\":{\"subnetId\":\"dd\"},\"thirdPartyConfigurations\":[{\"providerName\":\"bcuejrjxgci\",\"missionConfiguration\":\"ibrhosxsdqr\"},{\"providerName\":\"zoymibmrqyibahw\",\"missionConfiguration\":\"luszdtmhrkwof\"},{\"providerName\":\"yvoqa\",\"missionConfiguration\":\"piexpbtgiw\"},{\"providerName\":\"wo\",\"missionConfiguration\":\"nwashrtd\"}],\"links\":[{\"name\":\"cnqxwbpokulpi\",\"polarization\":\"RHCP\",\"direction\":\"Uplink\",\"gainOverTemperature\":47.424603,\"eirpdBW\":85.214745,\"channels\":[{\"name\":\"qiiobyuqer\",\"centerFrequencyMHz\":59.630554,\"bandwidthMHz\":6.2912345,\"endPoint\":{\"ipAddress\":\"pqwcciuqgbdbutau\",\"endPointName\":\"fbtkuwhhmhyk\",\"port\":\"joxafnndlpi\",\"protocol\":\"UDP\"}},{\"name\":\"koymkcd\",\"centerFrequencyMHz\":1.9727468,\"bandwidthMHz\":52.415318,\"endPoint\":{\"ipAddress\":\"pkkpw\",\"endPointName\":\"reqnovvqfov\",\"port\":\"jxywsuws\",\"protocol\":\"UDP\"}},{\"name\":\"s\",\"centerFrequencyMHz\":58.6494,\"bandwidthMHz\":74.82819,\"endPoint\":{\"ipAddress\":\"ytgadgvraeaene\",\"endPointName\":\"nzar\",\"port\":\"wlquuijfqkace\",\"protocol\":\"TCP\"}}]},{\"name\":\"ipfpubji\",\"polarization\":\"linearHorizontal\",\"direction\":\"Uplink\",\"gainOverTemperature\":5.9326353,\"eirpdBW\":86.60929,\"channels\":[{\"name\":\"qkvpuvksgplsakn\",\"centerFrequencyMHz\":0.79660416,\"bandwidthMHz\":68.44677,\"endPoint\":{\"ipAddress\":\"synljphuopxodl\",\"endPointName\":\"iyntorzihle\",\"port\":\"sjswsrms\",\"protocol\":\"UDP\"}},{\"name\":\"zrpzb\",\"centerFrequencyMHz\":73.3367,\"bandwidthMHz\":81.935295,\"endPoint\":{\"ipAddress\":\"kqqzqioxiysu\",\"endPointName\":\"i\",\"port\":\"ynkedyatrwyhqmib\",\"protocol\":\"UDP\"}},{\"name\":\"hwit\",\"centerFrequencyMHz\":65.06971,\"bandwidthMHz\":81.76519,\"endPoint\":{\"ipAddress\":\"pyy\",\"endPointName\":\"pcdpumnz\",\"port\":\"mwzn\",\"protocol\":\"TCP\"}},{\"name\":\"biknsorgjhxbld\",\"centerFrequencyMHz\":27.161957,\"bandwidthMHz\":66.445755,\"endPoint\":{\"ipAddress\":\"wrlkdmtn\",\"endPointName\":\"vokotllxdyh\",\"port\":\"syocogjltdtbnnha\",\"protocol\":\"UDP\"}}]},{\"name\":\"ocrkvcikh\",\"polarization\":\"RHCP\",\"direction\":\"Uplink\",\"gainOverTemperature\":16.389334,\"eirpdBW\":55.93623,\"channels\":[{\"name\":\"qqu\",\"centerFrequencyMHz\":43.360477,\"bandwidthMHz\":10.328889,\"endPoint\":{\"ipAddress\":\"kywggxkallatmel\",\"endPointName\":\"uipiccjzk\",\"port\":\"ivgvvcna\",\"protocol\":\"UDP\"}}]}]},\"location\":\"yrnxxmueedn\",\"tags\":{\"tkwqqtchealm\":\"v\",\"gdv\":\"mtdaa\"},\"id\":\"vgpiohgwxrt\",\"name\":\"udxepxgyqagv\",\"type\":\"vmnpkukghimdblx\"},{\"properties\":{\"provisioningState\":\"updating\",\"minimumViableContactDuration\":\"fnjhfjxwmszkkfo\",\"minimumElevationDegrees\":56.352932,\"autoTrackingConfiguration\":\"sBand\",\"eventHubUri\":\"zi\",\"networkConfiguration\":{\"subnetId\":\"fjawneaivxwczel\"},\"thirdPartyConfigurations\":[{\"providerName\":\"r\",\"missionConfiguration\":\"lsfeaenwabfatkld\"},{\"providerName\":\"xbjhwuaanozjosph\",\"missionConfiguration\":\"oulpjrv\"}],\"links\":[{\"name\":\"glrvimjwosytxi\",\"polarization\":\"linearHorizontal\",\"direction\":\"Uplink\",\"gainOverTemperature\":73.11868,\"eirpdBW\":4.9390373,\"channels\":[{\"name\":\"qumiek\",\"centerFrequencyMHz\":8.023405,\"bandwidthMHz\":74.09953,\"endPoint\":{\"ipAddress\":\"zikhl\",\"endPointName\":\"fjhdg\",\"port\":\"gge\",\"protocol\":\"TCP\"}}]}]},\"location\":\"nyga\",\"tags\":{\"fatpxllrxcyjmoa\":\"db\"},\"id\":\"su\",\"name\":\"arm\",\"type\":\"wdmjsjqbjhhyx\"},{\"properties\":{\"provisioningState\":\"deleting\",\"minimumViableContactDuration\":\"yc\",\"minimumElevationDegrees\":68.70334,\"autoTrackingConfiguration\":\"xBand\",\"eventHubUri\":\"xkgymareqnajxqu\",\"networkConfiguration\":{\"subnetId\":\"jhkycub\"},\"thirdPartyConfigurations\":[{\"providerName\":\"gssofwq\",\"missionConfiguration\":\"zqalkrmnjijpx\"},{\"providerName\":\"cqqudf\",\"missionConfiguration\":\"byxbaaabjy\"},{\"providerName\":\"ayffim\",\"missionConfiguration\":\"zrtuzq\"},{\"providerName\":\"gsexne\",\"missionConfiguration\":\"fdnw\"}],\"links\":[{\"name\":\"mewzsyyc\",\"polarization\":\"LHCP\",\"direction\":\"Downlink\",\"gainOverTemperature\":89.182625,\"eirpdBW\":81.26643,\"channels\":[{\"name\":\"ud\",\"centerFrequencyMHz\":92.32651,\"bandwidthMHz\":10.957659,\"endPoint\":{\"ipAddress\":\"xtrthz\",\"endPointName\":\"aytdwkqbrq\",\"port\":\"bpaxhexiilivpdt\",\"protocol\":\"TCP\"}},{\"name\":\"r\",\"centerFrequencyMHz\":83.604706,\"bandwidthMHz\":1.2664497,\"endPoint\":{\"ipAddress\":\"qoaxoruzfgs\",\"endPointName\":\"uyfxrxxleptramxj\",\"port\":\"zwl\",\"protocol\":\"UDP\"}}]},{\"name\":\"wxuqlcvydypatdoo\",\"polarization\":\"LHCP\",\"direction\":\"Uplink\",\"gainOverTemperature\":52.902954,\"eirpdBW\":20.04649,\"channels\":[{\"name\":\"kooebwnu\",\"centerFrequencyMHz\":25.77629,\"bandwidthMHz\":54.985764,\"endPoint\":{\"ipAddress\":\"mmsbvdkcrodtjin\",\"endPointName\":\"wj\",\"port\":\"fltkacjv\",\"protocol\":\"TCP\"}},{\"name\":\"kdlfoa\",\"centerFrequencyMHz\":79.17313,\"bandwidthMHz\":38.711143,\"endPoint\":{\"ipAddress\":\"kfpagao\",\"endPointName\":\"pulpqblylsyxk\",\"port\":\"jnsjervtiagxsd\",\"protocol\":\"UDP\"}},{\"name\":\"uem\",\"centerFrequencyMHz\":28.800655,\"bandwidthMHz\":65.141945,\"endPoint\":{\"ipAddress\":\"zkfzbeyv\",\"endPointName\":\"nqicvinvkjjxdxrb\",\"port\":\"ukzclewyhmlwpaz\",\"protocol\":\"TCP\"}}]}]},\"location\":\"ofncckwyfzqwhxxb\",\"tags\":{\"zfeqztppri\":\"a\"},\"id\":\"lxorjaltolmncws\",\"name\":\"bqwcsdbnwdcf\",\"type\":\"ucqdpfuvglsb\"}],\"nextLink\":\"ca\"}") - .toObject(ContactProfileListResult.class); - Assertions.assertEquals("mwyhr", model.value().get(0).location()); - Assertions.assertEquals("yftaakcpw", model.value().get(0).tags().get("yzvqt")); - Assertions.assertEquals(ContactProfilesPropertiesProvisioningState.SUCCEEDED, - model.value().get(0).provisioningState()); - Assertions.assertEquals("ujmkcjhwqy", model.value().get(0).minimumViableContactDuration()); - Assertions.assertEquals(1.7570734F, model.value().get(0).minimumElevationDegrees()); - Assertions.assertEquals(AutoTrackingConfiguration.DISABLED, model.value().get(0).autoTrackingConfiguration()); - Assertions.assertEquals("wj", model.value().get(0).eventHubUri()); - Assertions.assertEquals("wgdrjervnaenqp", model.value().get(0).networkConfiguration().subnetId()); - Assertions.assertEquals("ndoygmifthnzdnd", - model.value().get(0).thirdPartyConfigurations().get(0).providerName()); - Assertions.assertEquals("l", model.value().get(0).thirdPartyConfigurations().get(0).missionConfiguration()); - Assertions.assertEquals("n", model.value().get(0).links().get(0).name()); - Assertions.assertEquals(Polarization.LHCP, model.value().get(0).links().get(0).polarization()); - Assertions.assertEquals(Direction.DOWNLINK, model.value().get(0).links().get(0).direction()); - Assertions.assertEquals(55.65765F, model.value().get(0).links().get(0).gainOverTemperature()); - Assertions.assertEquals(81.210945F, model.value().get(0).links().get(0).eirpdBW()); - Assertions.assertEquals("iydmcwyhzdxs", model.value().get(0).links().get(0).channels().get(0).name()); - Assertions.assertEquals(80.603836f, model.value().get(0).links().get(0).channels().get(0).centerFrequencyMHz()); - Assertions.assertEquals(20.36894f, model.value().get(0).links().get(0).channels().get(0).bandwidthMHz()); - Assertions.assertEquals("bzmnvdfznud", - model.value().get(0).links().get(0).channels().get(0).endPoint().ipAddress()); - Assertions.assertEquals("od", model.value().get(0).links().get(0).channels().get(0).endPoint().endPointName()); - Assertions.assertEquals("xzb", model.value().get(0).links().get(0).channels().get(0).endPoint().port()); - Assertions.assertEquals(Protocol.UDP, - model.value().get(0).links().get(0).channels().get(0).endPoint().protocol()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContactProfileListResult model - = new ContactProfileListResult() - .withValue( - Arrays - .asList( - new ContactProfileInner().withLocation("mwyhr") - .withTags(mapOf("yzvqt", "yftaakcpw", "zksmondj", "nubexk")) - .withProvisioningState(ContactProfilesPropertiesProvisioningState.SUCCEEDED) - .withMinimumViableContactDuration("ujmkcjhwqy") - .withMinimumElevationDegrees(1.7570734F) - .withAutoTrackingConfiguration(AutoTrackingConfiguration.DISABLED) - .withEventHubUri("wj") - .withNetworkConfiguration( - new ContactProfilesPropertiesNetworkConfiguration().withSubnetId("wgdrjervnaenqp")) - .withThirdPartyConfigurations(Arrays.asList( - new ContactProfileThirdPartyConfiguration().withProviderName("ndoygmifthnzdnd") - .withMissionConfiguration("l"), - new ContactProfileThirdPartyConfiguration().withProviderName("nayqi") - .withMissionConfiguration("ynduha"), - new ContactProfileThirdPartyConfiguration().withProviderName("hqlkthumaqo") - .withMissionConfiguration("bgycduiertgccym"), - new ContactProfileThirdPartyConfiguration().withProviderName("aolps") - .withMissionConfiguration("lqlfm"))) - .withLinks( - Arrays - .asList( - new ContactProfileLink().withName("n") - .withPolarization(Polarization.LHCP) - .withDirection(Direction.DOWNLINK) - .withGainOverTemperature(55.65765F) - .withEirpdBW(81.210945F) - .withChannels( - Arrays.asList( - new ContactProfileLinkChannel().withName("iydmcwyhzdxs") - .withCenterFrequencyMHz(80.603836f) - .withBandwidthMHz(20.36894f) - .withEndPoint(new EndPoint().withIpAddress("bzmnvdfznud") - .withEndPointName("od") - .withPort("xzb") - .withProtocol(Protocol.UDP)), - new ContactProfileLinkChannel().withName("blylpstdbh") - .withCenterFrequencyMHz(21.126366f) - .withBandwidthMHz(76.3956f) - .withEndPoint(new EndPoint().withIpAddress("rzdzucerscdnt") - .withEndPointName("evfiwjmygt") - .withPort("sslswtmweriof") - .withProtocol(Protocol.TCP)), - new ContactProfileLinkChannel().withName("yqsemwa") - .withCenterFrequencyMHz(5.657935f) - .withBandwidthMHz(18.444378f) - .withEndPoint(new EndPoint().withIpAddress("tshhszhedp") - .withEndPointName("vwiwubmwmbesld") - .withPort("k") - .withProtocol(Protocol.UDP)), - new ContactProfileLinkChannel().withName("tppjflcx") - .withCenterFrequencyMHz(80.7271f) - .withBandwidthMHz(66.58158f) - .withEndPoint(new EndPoint() - .withIpAddress("okonzmnsikvmkqz") - .withEndPointName("qqkdltfzxmhhvhgu") - .withPort("eodkwobda") - .withProtocol(Protocol.UDP)))), - new ContactProfileLink().withName("tibqdxbxwakb") - .withPolarization(Polarization.LINEAR_HORIZONTAL) - .withDirection(Direction.UPLINK) - .withGainOverTemperature(69.47182F) - .withEirpdBW(79.54939F) - .withChannels(Arrays.asList( - new ContactProfileLinkChannel().withName("zgx") - .withCenterFrequencyMHz(85.23063f) - .withBandwidthMHz(22.702295f) - .withEndPoint(new EndPoint().withIpAddress("iplbpodxunkbebxm") - .withEndPointName("byyntwlrbqt") - .withPort("oievseotgqrlltm") - .withProtocol(Protocol.UDP)), - new ContactProfileLinkChannel().withName("lauwzizxbmpgcjef") - .withCenterFrequencyMHz(95.06782f) - .withBandwidthMHz(21.135498f) - .withEndPoint(new EndPoint().withIpAddress("uvpb") - .withEndPointName("tdum") - .withPort("rp") - .withProtocol(Protocol.TCP)), - new ContactProfileLinkChannel().withName("ebmnzbtbhjpglk") - .withCenterFrequencyMHz(82.34188f) - .withBandwidthMHz(49.83795f) - .withEndPoint(new EndPoint().withIpAddress("hdneuelfph") - .withEndPointName("dyhtozfikdowwquu") - .withPort("xzxcl") - .withProtocol(Protocol.TCP)))), - new ContactProfileLink().withName("thhqzonosggbh") - .withPolarization(Polarization.LHCP) - .withDirection(Direction.DOWNLINK) - .withGainOverTemperature(61.219753F) - .withEirpdBW(33.099705F) - .withChannels(Arrays.asList( - new ContactProfileLinkChannel().withName("n") - .withCenterFrequencyMHz(65.78154f) - .withBandwidthMHz(25.078642f) - .withEndPoint(new EndPoint().withIpAddress("jutiiswacff") - .withEndPointName("dkzzewkfvhqcrail") - .withPort("pnppfuf") - .withProtocol(Protocol.UDP)), - new ContactProfileLinkChannel().withName("wdmhdlxyjrxs") - .withCenterFrequencyMHz(94.25893f) - .withBandwidthMHz(37.06115f) - .withEndPoint(new EndPoint().withIpAddress("fcnihgwq") - .withEndPointName("pnedgf") - .withPort("cvkcvqvpkeqdcv") - .withProtocol(Protocol.TCP)), - new ContactProfileLinkChannel().withName("hvoodsotbobzd") - .withCenterFrequencyMHz(29.276281f) - .withBandwidthMHz(26.7008f) - .withEndPoint(new EndPoint().withIpAddress("j") - .withEndPointName("vnhdldwmgxcxr") - .withPort("lpmutwuoegrpkhj") - .withProtocol(Protocol.TCP)), - new ContactProfileLinkChannel().withName("iyq") - .withCenterFrequencyMHz(99.57627f) - .withBandwidthMHz(28.484118f) - .withEndPoint(new EndPoint().withIpAddress("i") - .withEndPointName("pdggkzzlvm") - .withPort("mpaxmodfvuefywsb") - .withProtocol(Protocol.TCP)))))), - new ContactProfileInner().withLocation("yrnxxmueedn") - .withTags(mapOf("tkwqqtchealm", "v", "gdv", "mtdaa")) - .withProvisioningState(ContactProfilesPropertiesProvisioningState.FAILED) - .withMinimumViableContactDuration("ocmbqfqvmkcxoza") - .withMinimumElevationDegrees(56.86097F) - .withAutoTrackingConfiguration(AutoTrackingConfiguration.DISABLED) - .withEventHubUri("prglya") - .withNetworkConfiguration( - new ContactProfilesPropertiesNetworkConfiguration().withSubnetId("dd")) - .withThirdPartyConfigurations(Arrays.asList( - new ContactProfileThirdPartyConfiguration().withProviderName("bcuejrjxgci") - .withMissionConfiguration("ibrhosxsdqr"), - new ContactProfileThirdPartyConfiguration().withProviderName("zoymibmrqyibahw") - .withMissionConfiguration("luszdtmhrkwof"), - new ContactProfileThirdPartyConfiguration().withProviderName("yvoqa") - .withMissionConfiguration("piexpbtgiw"), - new ContactProfileThirdPartyConfiguration().withProviderName("wo") - .withMissionConfiguration("nwashrtd"))) - .withLinks(Arrays.asList( - new ContactProfileLink().withName("cnqxwbpokulpi") - .withPolarization(Polarization.RHCP) - .withDirection(Direction.UPLINK) - .withGainOverTemperature(47.424603F) - .withEirpdBW(85.214745F) - .withChannels(Arrays.asList( - new ContactProfileLinkChannel().withName("qiiobyuqer") - .withCenterFrequencyMHz(59.630554f) - .withBandwidthMHz(6.2912345f) - .withEndPoint(new EndPoint().withIpAddress("pqwcciuqgbdbutau") - .withEndPointName("fbtkuwhhmhyk") - .withPort("joxafnndlpi") - .withProtocol(Protocol.UDP)), - new ContactProfileLinkChannel().withName("koymkcd") - .withCenterFrequencyMHz(1.9727468f) - .withBandwidthMHz(52.415318f) - .withEndPoint(new EndPoint().withIpAddress("pkkpw") - .withEndPointName("reqnovvqfov") - .withPort("jxywsuws") - .withProtocol(Protocol.UDP)), - new ContactProfileLinkChannel().withName("s") - .withCenterFrequencyMHz(58.6494f) - .withBandwidthMHz(74.82819f) - .withEndPoint(new EndPoint().withIpAddress("ytgadgvraeaene") - .withEndPointName("nzar") - .withPort("wlquuijfqkace") - .withProtocol(Protocol.TCP)))), - new ContactProfileLink() - .withName("ipfpubji") - .withPolarization(Polarization.LINEAR_HORIZONTAL) - .withDirection(Direction.UPLINK) - .withGainOverTemperature(5.9326353F) - .withEirpdBW(86.60929F) - .withChannels(Arrays.asList( - new ContactProfileLinkChannel().withName("qkvpuvksgplsakn") - .withCenterFrequencyMHz(0.79660416f) - .withBandwidthMHz(68.44677f) - .withEndPoint(new EndPoint().withIpAddress("synljphuopxodl") - .withEndPointName("iyntorzihle") - .withPort("sjswsrms") - .withProtocol(Protocol.UDP)), - new ContactProfileLinkChannel().withName("zrpzb") - .withCenterFrequencyMHz(73.3367f) - .withBandwidthMHz(81.935295f) - .withEndPoint(new EndPoint().withIpAddress("kqqzqioxiysu") - .withEndPointName("i") - .withPort("ynkedyatrwyhqmib") - .withProtocol(Protocol.UDP)), - new ContactProfileLinkChannel().withName("hwit") - .withCenterFrequencyMHz(65.06971f) - .withBandwidthMHz(81.76519f) - .withEndPoint(new EndPoint().withIpAddress("pyy") - .withEndPointName("pcdpumnz") - .withPort("mwzn") - .withProtocol(Protocol.TCP)), - new ContactProfileLinkChannel().withName("biknsorgjhxbld") - .withCenterFrequencyMHz(27.161957f) - .withBandwidthMHz(66.445755f) - .withEndPoint(new EndPoint().withIpAddress("wrlkdmtn") - .withEndPointName("vokotllxdyh") - .withPort("syocogjltdtbnnha") - .withProtocol(Protocol.UDP)))), - new ContactProfileLink().withName("ocrkvcikh") - .withPolarization(Polarization.RHCP) - .withDirection(Direction.UPLINK) - .withGainOverTemperature(16.389334F) - .withEirpdBW(55.93623F) - .withChannels(Arrays.asList(new ContactProfileLinkChannel().withName("qqu") - .withCenterFrequencyMHz(43.360477f) - .withBandwidthMHz(10.328889f) - .withEndPoint(new EndPoint().withIpAddress("kywggxkallatmel") - .withEndPointName("uipiccjzk") - .withPort("ivgvvcna") - .withProtocol(Protocol.UDP)))))), - new ContactProfileInner().withLocation("nyga") - .withTags(mapOf("fatpxllrxcyjmoa", "db")) - .withProvisioningState(ContactProfilesPropertiesProvisioningState.UPDATING) - .withMinimumViableContactDuration("fnjhfjxwmszkkfo") - .withMinimumElevationDegrees(56.352932F) - .withAutoTrackingConfiguration(AutoTrackingConfiguration.S_BAND) - .withEventHubUri("zi") - .withNetworkConfiguration( - new ContactProfilesPropertiesNetworkConfiguration().withSubnetId("fjawneaivxwczel")) - .withThirdPartyConfigurations( - Arrays.asList( - new ContactProfileThirdPartyConfiguration().withProviderName("r") - .withMissionConfiguration("lsfeaenwabfatkld"), - new ContactProfileThirdPartyConfiguration().withProviderName("xbjhwuaanozjosph") - .withMissionConfiguration("oulpjrv"))) - .withLinks( - Arrays - .asList( - new ContactProfileLink().withName("glrvimjwosytxi") - .withPolarization(Polarization.LINEAR_HORIZONTAL) - .withDirection(Direction.UPLINK) - .withGainOverTemperature(73.11868F) - .withEirpdBW(4.9390373F) - .withChannels( - Arrays.asList(new ContactProfileLinkChannel().withName("qumiek") - .withCenterFrequencyMHz(8.023405f) - .withBandwidthMHz(74.09953f) - .withEndPoint(new EndPoint().withIpAddress("zikhl") - .withEndPointName("fjhdg") - .withPort("gge") - .withProtocol(Protocol.TCP)))))), - new ContactProfileInner().withLocation("ofncckwyfzqwhxxb") - .withTags(mapOf("zfeqztppri", "a")) - .withProvisioningState(ContactProfilesPropertiesProvisioningState.DELETING) - .withMinimumViableContactDuration("yc") - .withMinimumElevationDegrees(68.70334F) - .withAutoTrackingConfiguration(AutoTrackingConfiguration.X_BAND) - .withEventHubUri("xkgymareqnajxqu") - .withNetworkConfiguration(new ContactProfilesPropertiesNetworkConfiguration() - .withSubnetId("jhkycub")) - .withThirdPartyConfigurations(Arrays - .asList( - new ContactProfileThirdPartyConfiguration().withProviderName("gssofwq") - .withMissionConfiguration("zqalkrmnjijpx"), - new ContactProfileThirdPartyConfiguration().withProviderName("cqqudf") - .withMissionConfiguration("byxbaaabjy"), - new ContactProfileThirdPartyConfiguration().withProviderName("ayffim") - .withMissionConfiguration("zrtuzq"), - new ContactProfileThirdPartyConfiguration().withProviderName("gsexne") - .withMissionConfiguration("fdnw"))) - .withLinks( - Arrays - .asList( - new ContactProfileLink().withName("mewzsyyc") - .withPolarization(Polarization.LHCP) - .withDirection(Direction.DOWNLINK) - .withGainOverTemperature(89.182625F) - .withEirpdBW(81.26643F) - .withChannels( - Arrays.asList( - new ContactProfileLinkChannel().withName("ud") - .withCenterFrequencyMHz(92.32651f) - .withBandwidthMHz(10.957659f) - .withEndPoint(new EndPoint().withIpAddress("xtrthz") - .withEndPointName("aytdwkqbrq") - .withPort("bpaxhexiilivpdt") - .withProtocol(Protocol.TCP)), - new ContactProfileLinkChannel().withName("r") - .withCenterFrequencyMHz(83.604706f) - .withBandwidthMHz(1.2664497f) - .withEndPoint(new EndPoint().withIpAddress("qoaxoruzfgs") - .withEndPointName("uyfxrxxleptramxj") - .withPort("zwl") - .withProtocol(Protocol.UDP)))), - new ContactProfileLink().withName("wxuqlcvydypatdoo") - .withPolarization(Polarization.LHCP) - .withDirection(Direction.UPLINK) - .withGainOverTemperature(52.902954F) - .withEirpdBW(20.04649F) - .withChannels(Arrays.asList( - new ContactProfileLinkChannel().withName("kooebwnu") - .withCenterFrequencyMHz(25.77629f) - .withBandwidthMHz(54.985764f) - .withEndPoint(new EndPoint().withIpAddress("mmsbvdkcrodtjin") - .withEndPointName("wj") - .withPort("fltkacjv") - .withProtocol(Protocol.TCP)), - new ContactProfileLinkChannel().withName("kdlfoa") - .withCenterFrequencyMHz(79.17313f) - .withBandwidthMHz(38.711143f) - .withEndPoint(new EndPoint().withIpAddress("kfpagao") - .withEndPointName("pulpqblylsyxk") - .withPort("jnsjervtiagxsd") - .withProtocol(Protocol.UDP)), - new ContactProfileLinkChannel().withName("uem") - .withCenterFrequencyMHz(28.800655f) - .withBandwidthMHz(65.141945f) - .withEndPoint(new EndPoint().withIpAddress("zkfzbeyv") - .withEndPointName("nqicvinvkjjxdxrb") - .withPort("ukzclewyhmlwpaz") - .withProtocol(Protocol.TCP)))))))); - model = BinaryData.fromObject(model).toObject(ContactProfileListResult.class); - Assertions.assertEquals("mwyhr", model.value().get(0).location()); - Assertions.assertEquals("yftaakcpw", model.value().get(0).tags().get("yzvqt")); - Assertions.assertEquals(ContactProfilesPropertiesProvisioningState.SUCCEEDED, - model.value().get(0).provisioningState()); - Assertions.assertEquals("ujmkcjhwqy", model.value().get(0).minimumViableContactDuration()); - Assertions.assertEquals(1.7570734F, model.value().get(0).minimumElevationDegrees()); - Assertions.assertEquals(AutoTrackingConfiguration.DISABLED, model.value().get(0).autoTrackingConfiguration()); - Assertions.assertEquals("wj", model.value().get(0).eventHubUri()); - Assertions.assertEquals("wgdrjervnaenqp", model.value().get(0).networkConfiguration().subnetId()); - Assertions.assertEquals("ndoygmifthnzdnd", - model.value().get(0).thirdPartyConfigurations().get(0).providerName()); - Assertions.assertEquals("l", model.value().get(0).thirdPartyConfigurations().get(0).missionConfiguration()); - Assertions.assertEquals("n", model.value().get(0).links().get(0).name()); - Assertions.assertEquals(Polarization.LHCP, model.value().get(0).links().get(0).polarization()); - Assertions.assertEquals(Direction.DOWNLINK, model.value().get(0).links().get(0).direction()); - Assertions.assertEquals(55.65765F, model.value().get(0).links().get(0).gainOverTemperature()); - Assertions.assertEquals(81.210945F, model.value().get(0).links().get(0).eirpdBW()); - Assertions.assertEquals("iydmcwyhzdxs", model.value().get(0).links().get(0).channels().get(0).name()); - Assertions.assertEquals(80.603836f, model.value().get(0).links().get(0).channels().get(0).centerFrequencyMHz()); - Assertions.assertEquals(20.36894f, model.value().get(0).links().get(0).channels().get(0).bandwidthMHz()); - Assertions.assertEquals("bzmnvdfznud", - model.value().get(0).links().get(0).channels().get(0).endPoint().ipAddress()); - Assertions.assertEquals("od", model.value().get(0).links().get(0).channels().get(0).endPoint().endPointName()); - Assertions.assertEquals("xzb", model.value().get(0).links().get(0).channels().get(0).endPoint().port()); - Assertions.assertEquals(Protocol.UDP, - model.value().get(0).links().get(0).channels().get(0).endPoint().protocol()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilePropertiesTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilePropertiesTests.java deleted file mode 100644 index 5750ea665abc..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilePropertiesTests.java +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.fluent.models.ContactProfileProperties; -import com.azure.resourcemanager.orbital.models.AutoTrackingConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfileLink; -import com.azure.resourcemanager.orbital.models.ContactProfileLinkChannel; -import com.azure.resourcemanager.orbital.models.ContactProfileThirdPartyConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesNetworkConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesProvisioningState; -import com.azure.resourcemanager.orbital.models.Direction; -import com.azure.resourcemanager.orbital.models.EndPoint; -import com.azure.resourcemanager.orbital.models.Polarization; -import com.azure.resourcemanager.orbital.models.Protocol; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ContactProfilePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContactProfileProperties model = BinaryData.fromString( - "{\"provisioningState\":\"failed\",\"minimumViableContactDuration\":\"qyud\",\"minimumElevationDegrees\":99.38068,\"autoTrackingConfiguration\":\"xBand\",\"eventHubUri\":\"b\",\"networkConfiguration\":{\"subnetId\":\"oczvy\"},\"thirdPartyConfigurations\":[{\"providerName\":\"rvkdvjsllrm\",\"missionConfiguration\":\"vdfwatkpn\"},{\"providerName\":\"ulexxbczwtr\",\"missionConfiguration\":\"wiqzbqjvsovmyo\"}],\"links\":[{\"name\":\"cspkwlhzdobpxjmf\",\"polarization\":\"linearVertical\",\"direction\":\"Downlink\",\"gainOverTemperature\":57.130917,\"eirpdBW\":15.858865,\"channels\":[{\"name\":\"kcciwwzjuqkhr\",\"centerFrequencyMHz\":41.596596,\"bandwidthMHz\":93.71816,\"endPoint\":{\"ipAddress\":\"iwkuofos\",\"endPointName\":\"ghsauuimjmvxied\",\"port\":\"ugidyjrr\",\"protocol\":\"TCP\"},\"modulationConfiguration\":\"aos\",\"demodulationConfiguration\":\"xc\",\"encodingConfiguration\":\"npc\",\"decodingConfiguration\":\"ocohslkevleg\"},{\"name\":\"zfbuhf\",\"centerFrequencyMHz\":72.908226,\"bandwidthMHz\":51.234745,\"endPoint\":{\"ipAddress\":\"axkffei\",\"endPointName\":\"th\",\"port\":\"vmezy\",\"protocol\":\"UDP\"},\"modulationConfiguration\":\"xmzsbbzogg\",\"demodulationConfiguration\":\"rxwburv\",\"encodingConfiguration\":\"xjnspy\",\"decodingConfiguration\":\"tko\"},{\"name\":\"nkoukn\",\"centerFrequencyMHz\":51.713753,\"bandwidthMHz\":79.01165,\"endPoint\":{\"ipAddress\":\"wtiukbldn\",\"endPointName\":\"kpoc\",\"port\":\"pazyxoegukg\",\"protocol\":\"UDP\"},\"modulationConfiguration\":\"iucgygevqzn\",\"demodulationConfiguration\":\"pmr\",\"encodingConfiguration\":\"izcdrqjsd\",\"decodingConfiguration\":\"dnfyhxdeoejzicwi\"}]},{\"name\":\"sjttgzfbish\",\"polarization\":\"RHCP\",\"direction\":\"Uplink\",\"gainOverTemperature\":82.81528,\"eirpdBW\":99.54184,\"channels\":[{\"name\":\"yeamdphagalpb\",\"centerFrequencyMHz\":7.554859,\"bandwidthMHz\":52.059467,\"endPoint\":{\"ipAddress\":\"gipwhonowkg\",\"endPointName\":\"hwankixzbinjepu\",\"port\":\"tmryw\",\"protocol\":\"TCP\"},\"modulationConfiguration\":\"oqftiyqzrnkcq\",\"demodulationConfiguration\":\"xlwhzlsicoh\",\"encodingConfiguration\":\"qnwvlrya\",\"decodingConfiguration\":\"hheunmmqhgyx\"},{\"name\":\"konocu\",\"centerFrequencyMHz\":69.11444,\"bandwidthMHz\":60.951405,\"endPoint\":{\"ipAddress\":\"lyaxuc\",\"endPointName\":\"nuqszfkbey\",\"port\":\"ewrmjmwvvjektc\",\"protocol\":\"TCP\"},\"modulationConfiguration\":\"nhwlrsffrzpwvl\",\"demodulationConfiguration\":\"q\",\"encodingConfiguration\":\"iqylihkaetck\",\"decodingConfiguration\":\"fcivfsnkym\"}]}]}") - .toObject(ContactProfileProperties.class); - Assertions.assertEquals(ContactProfilesPropertiesProvisioningState.FAILED, model.provisioningState()); - Assertions.assertEquals("qyud", model.minimumViableContactDuration()); - Assertions.assertEquals(99.38068F, model.minimumElevationDegrees()); - Assertions.assertEquals(AutoTrackingConfiguration.X_BAND, model.autoTrackingConfiguration()); - Assertions.assertEquals("b", model.eventHubUri()); - Assertions.assertEquals("oczvy", model.networkConfiguration().subnetId()); - Assertions.assertEquals("rvkdvjsllrm", model.thirdPartyConfigurations().get(0).providerName()); - Assertions.assertEquals("vdfwatkpn", model.thirdPartyConfigurations().get(0).missionConfiguration()); - Assertions.assertEquals("cspkwlhzdobpxjmf", model.links().get(0).name()); - Assertions.assertEquals(Polarization.LINEAR_VERTICAL, model.links().get(0).polarization()); - Assertions.assertEquals(Direction.DOWNLINK, model.links().get(0).direction()); - Assertions.assertEquals(57.130917F, model.links().get(0).gainOverTemperature()); - Assertions.assertEquals(15.858865F, model.links().get(0).eirpdBW()); - Assertions.assertEquals("kcciwwzjuqkhr", model.links().get(0).channels().get(0).name()); - Assertions.assertEquals(41.596596f, model.links().get(0).channels().get(0).centerFrequencyMHz()); - Assertions.assertEquals(93.71816f, model.links().get(0).channels().get(0).bandwidthMHz()); - Assertions.assertEquals("iwkuofos", model.links().get(0).channels().get(0).endPoint().ipAddress()); - Assertions.assertEquals("ghsauuimjmvxied", model.links().get(0).channels().get(0).endPoint().endPointName()); - Assertions.assertEquals("ugidyjrr", model.links().get(0).channels().get(0).endPoint().port()); - Assertions.assertEquals(Protocol.TCP, model.links().get(0).channels().get(0).endPoint().protocol()); - Assertions.assertEquals("aos", model.links().get(0).channels().get(0).modulationConfiguration()); - Assertions.assertEquals("xc", model.links().get(0).channels().get(0).demodulationConfiguration()); - Assertions.assertEquals("npc", model.links().get(0).channels().get(0).encodingConfiguration()); - Assertions.assertEquals("ocohslkevleg", model.links().get(0).channels().get(0).decodingConfiguration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContactProfileProperties model - = new ContactProfileProperties().withProvisioningState(ContactProfilesPropertiesProvisioningState.FAILED) - .withMinimumViableContactDuration("qyud") - .withMinimumElevationDegrees(99.38068F) - .withAutoTrackingConfiguration(AutoTrackingConfiguration.X_BAND) - .withEventHubUri("b") - .withNetworkConfiguration(new ContactProfilesPropertiesNetworkConfiguration().withSubnetId("oczvy")) - .withThirdPartyConfigurations(Arrays.asList( - new ContactProfileThirdPartyConfiguration().withProviderName("rvkdvjsllrm") - .withMissionConfiguration("vdfwatkpn"), - new ContactProfileThirdPartyConfiguration().withProviderName("ulexxbczwtr") - .withMissionConfiguration("wiqzbqjvsovmyo"))) - .withLinks(Arrays.asList( - new ContactProfileLink().withName("cspkwlhzdobpxjmf") - .withPolarization(Polarization.LINEAR_VERTICAL) - .withDirection(Direction.DOWNLINK) - .withGainOverTemperature(57.130917F) - .withEirpdBW(15.858865F) - .withChannels(Arrays.asList( - new ContactProfileLinkChannel().withName("kcciwwzjuqkhr") - .withCenterFrequencyMHz(41.596596f) - .withBandwidthMHz(93.71816f) - .withEndPoint(new EndPoint().withIpAddress("iwkuofos") - .withEndPointName("ghsauuimjmvxied") - .withPort("ugidyjrr") - .withProtocol(Protocol.TCP)) - .withModulationConfiguration("aos") - .withDemodulationConfiguration("xc") - .withEncodingConfiguration("npc") - .withDecodingConfiguration("ocohslkevleg"), - new ContactProfileLinkChannel().withName("zfbuhf") - .withCenterFrequencyMHz(72.908226f) - .withBandwidthMHz(51.234745f) - .withEndPoint(new EndPoint().withIpAddress("axkffei") - .withEndPointName("th") - .withPort("vmezy") - .withProtocol(Protocol.UDP)) - .withModulationConfiguration("xmzsbbzogg") - .withDemodulationConfiguration("rxwburv") - .withEncodingConfiguration("xjnspy") - .withDecodingConfiguration("tko"), - new ContactProfileLinkChannel().withName("nkoukn") - .withCenterFrequencyMHz(51.713753f) - .withBandwidthMHz(79.01165f) - .withEndPoint(new EndPoint().withIpAddress("wtiukbldn") - .withEndPointName("kpoc") - .withPort("pazyxoegukg") - .withProtocol(Protocol.UDP)) - .withModulationConfiguration("iucgygevqzn") - .withDemodulationConfiguration("pmr") - .withEncodingConfiguration("izcdrqjsd") - .withDecodingConfiguration("dnfyhxdeoejzicwi"))), - new ContactProfileLink().withName("sjttgzfbish") - .withPolarization(Polarization.RHCP) - .withDirection(Direction.UPLINK) - .withGainOverTemperature(82.81528F) - .withEirpdBW(99.54184F) - .withChannels(Arrays.asList( - new ContactProfileLinkChannel().withName("yeamdphagalpb") - .withCenterFrequencyMHz(7.554859f) - .withBandwidthMHz(52.059467f) - .withEndPoint(new EndPoint().withIpAddress("gipwhonowkg") - .withEndPointName("hwankixzbinjepu") - .withPort("tmryw") - .withProtocol(Protocol.TCP)) - .withModulationConfiguration("oqftiyqzrnkcq") - .withDemodulationConfiguration("xlwhzlsicoh") - .withEncodingConfiguration("qnwvlrya") - .withDecodingConfiguration("hheunmmqhgyx"), - new ContactProfileLinkChannel().withName("konocu") - .withCenterFrequencyMHz(69.11444f) - .withBandwidthMHz(60.951405f) - .withEndPoint(new EndPoint().withIpAddress("lyaxuc") - .withEndPointName("nuqszfkbey") - .withPort("ewrmjmwvvjektc") - .withProtocol(Protocol.TCP)) - .withModulationConfiguration("nhwlrsffrzpwvl") - .withDemodulationConfiguration("q") - .withEncodingConfiguration("iqylihkaetck") - .withDecodingConfiguration("fcivfsnkym"))))); - model = BinaryData.fromObject(model).toObject(ContactProfileProperties.class); - Assertions.assertEquals(ContactProfilesPropertiesProvisioningState.FAILED, model.provisioningState()); - Assertions.assertEquals("qyud", model.minimumViableContactDuration()); - Assertions.assertEquals(99.38068F, model.minimumElevationDegrees()); - Assertions.assertEquals(AutoTrackingConfiguration.X_BAND, model.autoTrackingConfiguration()); - Assertions.assertEquals("b", model.eventHubUri()); - Assertions.assertEquals("oczvy", model.networkConfiguration().subnetId()); - Assertions.assertEquals("rvkdvjsllrm", model.thirdPartyConfigurations().get(0).providerName()); - Assertions.assertEquals("vdfwatkpn", model.thirdPartyConfigurations().get(0).missionConfiguration()); - Assertions.assertEquals("cspkwlhzdobpxjmf", model.links().get(0).name()); - Assertions.assertEquals(Polarization.LINEAR_VERTICAL, model.links().get(0).polarization()); - Assertions.assertEquals(Direction.DOWNLINK, model.links().get(0).direction()); - Assertions.assertEquals(57.130917F, model.links().get(0).gainOverTemperature()); - Assertions.assertEquals(15.858865F, model.links().get(0).eirpdBW()); - Assertions.assertEquals("kcciwwzjuqkhr", model.links().get(0).channels().get(0).name()); - Assertions.assertEquals(41.596596f, model.links().get(0).channels().get(0).centerFrequencyMHz()); - Assertions.assertEquals(93.71816f, model.links().get(0).channels().get(0).bandwidthMHz()); - Assertions.assertEquals("iwkuofos", model.links().get(0).channels().get(0).endPoint().ipAddress()); - Assertions.assertEquals("ghsauuimjmvxied", model.links().get(0).channels().get(0).endPoint().endPointName()); - Assertions.assertEquals("ugidyjrr", model.links().get(0).channels().get(0).endPoint().port()); - Assertions.assertEquals(Protocol.TCP, model.links().get(0).channels().get(0).endPoint().protocol()); - Assertions.assertEquals("aos", model.links().get(0).channels().get(0).modulationConfiguration()); - Assertions.assertEquals("xc", model.links().get(0).channels().get(0).demodulationConfiguration()); - Assertions.assertEquals("npc", model.links().get(0).channels().get(0).encodingConfiguration()); - Assertions.assertEquals("ocohslkevleg", model.links().get(0).channels().get(0).decodingConfiguration()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfileThirdPartyConfigurationTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfileThirdPartyConfigurationTests.java deleted file mode 100644 index 9c33652e9244..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfileThirdPartyConfigurationTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.ContactProfileThirdPartyConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class ContactProfileThirdPartyConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContactProfileThirdPartyConfiguration model - = BinaryData.fromString("{\"providerName\":\"oellwp\",\"missionConfiguration\":\"fdygpfqbuaceopz\"}") - .toObject(ContactProfileThirdPartyConfiguration.class); - Assertions.assertEquals("oellwp", model.providerName()); - Assertions.assertEquals("fdygpfqbuaceopz", model.missionConfiguration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContactProfileThirdPartyConfiguration model - = new ContactProfileThirdPartyConfiguration().withProviderName("oellwp") - .withMissionConfiguration("fdygpfqbuaceopz"); - model = BinaryData.fromObject(model).toObject(ContactProfileThirdPartyConfiguration.class); - Assertions.assertEquals("oellwp", model.providerName()); - Assertions.assertEquals("fdygpfqbuaceopz", model.missionConfiguration()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesCreateOrUpdateMockTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesCreateOrUpdateMockTests.java deleted file mode 100644 index 45987392b75a..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesCreateOrUpdateMockTests.java +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.orbital.OrbitalManager; -import com.azure.resourcemanager.orbital.models.AutoTrackingConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfile; -import com.azure.resourcemanager.orbital.models.ContactProfileLink; -import com.azure.resourcemanager.orbital.models.ContactProfileLinkChannel; -import com.azure.resourcemanager.orbital.models.ContactProfileThirdPartyConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesNetworkConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesProvisioningState; -import com.azure.resourcemanager.orbital.models.Direction; -import com.azure.resourcemanager.orbital.models.EndPoint; -import com.azure.resourcemanager.orbital.models.Polarization; -import com.azure.resourcemanager.orbital.models.Protocol; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContactProfilesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"minimumViableContactDuration\":\"hjxa\",\"minimumElevationDegrees\":30.664253,\"autoTrackingConfiguration\":\"xBand\",\"eventHubUri\":\"lordilmywwtkgkxn\",\"networkConfiguration\":{\"subnetId\":\"edabgyvudtjue\"},\"thirdPartyConfigurations\":[{\"providerName\":\"ihxuuwh\",\"missionConfiguration\":\"j\"},{\"providerName\":\"xccybvpa\",\"missionConfiguration\":\"akkud\"},{\"providerName\":\"px\",\"missionConfiguration\":\"wjplma\"}],\"links\":[{\"name\":\"tcyohpfkyrk\",\"polarization\":\"linearVertical\",\"direction\":\"Uplink\",\"gainOverTemperature\":56.479233,\"eirpdBW\":15.116018,\"channels\":[{\"name\":\"jkmnwq\",\"centerFrequencyMHz\":94.966415,\"bandwidthMHz\":87.046394,\"endPoint\":{\"ipAddress\":\"baiyhddviaceg\",\"endPointName\":\"n\",\"port\":\"ntfpmvmemfnc\",\"protocol\":\"TCP\"}},{\"name\":\"wvvb\",\"centerFrequencyMHz\":53.000874,\"bandwidthMHz\":38.038097,\"endPoint\":{\"ipAddress\":\"lllchpodb\",\"endPointName\":\"evwrdnhfuk\",\"port\":\"vsjcswsmystuluqy\",\"protocol\":\"TCP\"}}]},{\"name\":\"cvlerchpqbmfpjba\",\"polarization\":\"RHCP\",\"direction\":\"Downlink\",\"gainOverTemperature\":78.01136,\"eirpdBW\":75.51508,\"channels\":[{\"name\":\"spuunnoxyhkxgq\",\"centerFrequencyMHz\":99.49231,\"bandwidthMHz\":48.135914,\"endPoint\":{\"ipAddress\":\"i\",\"endPointName\":\"pfhoqcaaewdao\",\"port\":\"djvlpj\",\"protocol\":\"TCP\"}},{\"name\":\"kzbrmsgeivsiy\",\"centerFrequencyMHz\":27.006971,\"bandwidthMHz\":30.264484,\"endPoint\":{\"ipAddress\":\"dncj\",\"endPointName\":\"xonbzoggculapz\",\"port\":\"y\",\"protocol\":\"UDP\"}},{\"name\":\"gogtqxepnylbf\",\"centerFrequencyMHz\":82.768166,\"bandwidthMHz\":58.09601,\"endPoint\":{\"ipAddress\":\"lyjt\",\"endPointName\":\"vofqzhvfc\",\"port\":\"byfmowuxr\",\"protocol\":\"TCP\"}},{\"name\":\"pvdwxf\",\"centerFrequencyMHz\":77.284424,\"bandwidthMHz\":99.00972,\"endPoint\":{\"ipAddress\":\"ivwzjbhyzs\",\"endPointName\":\"jrkambtrnegvmnv\",\"port\":\"q\",\"protocol\":\"UDP\"}}]},{\"name\":\"vldspa\",\"polarization\":\"RHCP\",\"direction\":\"Downlink\",\"gainOverTemperature\":34.49968,\"eirpdBW\":25.554615,\"channels\":[{\"name\":\"flvestmjlxrrilo\",\"centerFrequencyMHz\":74.649536,\"bandwidthMHz\":65.04678,\"endPoint\":{\"ipAddress\":\"eewchpxlktw\",\"endPointName\":\"uziycsl\",\"port\":\"vu\",\"protocol\":\"UDP\"}},{\"name\":\"ztcktyh\",\"centerFrequencyMHz\":66.69776,\"bandwidthMHz\":59.33001,\"endPoint\":{\"ipAddress\":\"edcg\",\"endPointName\":\"ulwm\",\"port\":\"rqzz\",\"protocol\":\"UDP\"}}]},{\"name\":\"jvpglydzgk\",\"polarization\":\"linearVertical\",\"direction\":\"Uplink\",\"gainOverTemperature\":8.784514,\"eirpdBW\":38.789143,\"channels\":[{\"name\":\"epr\",\"centerFrequencyMHz\":89.64401,\"bandwidthMHz\":2.533424,\"endPoint\":{\"ipAddress\":\"nwy\",\"endPointName\":\"pzdm\",\"port\":\"vzvfvaawzqadfl\",\"protocol\":\"TCP\"}},{\"name\":\"ur\",\"centerFrequencyMHz\":24.852264,\"bandwidthMHz\":73.55753,\"endPoint\":{\"ipAddress\":\"aecxndtic\",\"endPointName\":\"kpvzmlq\",\"port\":\"mldgxobfirc\",\"protocol\":\"TCP\"}}]}]},\"location\":\"kciayzri\",\"tags\":{\"kjlmx\":\"yawfvjlboxq\"},\"id\":\"omdynhdwdigum\",\"name\":\"nraauzz\",\"type\":\"tj\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OrbitalManager manager = OrbitalManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ContactProfile response = manager.contactProfiles() - .define("sutujba") - .withRegion("fvazivjlfrqttba") - .withExistingResourceGroup("enr") - .withNetworkConfiguration(new ContactProfilesPropertiesNetworkConfiguration().withSubnetId("wpklvxw")) - .withLinks(Arrays.asList( - new ContactProfileLink().withName("uuepzlrphwzsoldw") - .withPolarization(Polarization.LHCP) - .withDirection(Direction.DOWNLINK) - .withGainOverTemperature(99.18592F) - .withEirpdBW(87.928825F) - .withChannels(Arrays.asList( - new ContactProfileLinkChannel().withName("mnnrwr") - .withCenterFrequencyMHz(1.8541336f) - .withBandwidthMHz(17.158354f) - .withEndPoint(new EndPoint().withIpAddress("rk") - .withEndPointName("alywjhhgdn") - .withPort("xmsivfomiloxggdu") - .withProtocol(Protocol.UDP)), - new ContactProfileLinkChannel().withName("q") - .withCenterFrequencyMHz(53.11064f) - .withBandwidthMHz(88.44245f) - .withEndPoint(new EndPoint().withIpAddress("euzaof") - .withEndPointName("chvcyyysfgdo") - .withPort("cubiipuipw") - .withProtocol(Protocol.TCP)))), - new ContactProfileLink().withName("onmacjekniz") - .withPolarization(Polarization.LINEAR_HORIZONTAL) - .withDirection(Direction.UPLINK) - .withGainOverTemperature(48.20631F) - .withEirpdBW(2.8592408F) - .withChannels(Arrays.asList(new ContactProfileLinkChannel().withName("ev") - .withCenterFrequencyMHz(40.36637f) - .withBandwidthMHz(66.675064f) - .withEndPoint(new EndPoint().withIpAddress("b") - .withEndPointName("rrilbywdxsmic") - .withPort("wrwfscjfnyns") - .withProtocol(Protocol.TCP)))), - new ContactProfileLink().withName("ujiz") - .withPolarization(Polarization.LHCP) - .withDirection(Direction.DOWNLINK) - .withGainOverTemperature(41.774715F) - .withEirpdBW(88.05086F) - .withChannels(Arrays.asList( - new ContactProfileLinkChannel().withName("yo") - .withCenterFrequencyMHz(53.959526f) - .withBandwidthMHz(69.872574f) - .withEndPoint(new EndPoint().withIpAddress("lgy") - .withEndPointName("vutpthjoxo") - .withPort("smsks") - .withProtocol(Protocol.TCP)), - new ContactProfileLinkChannel().withName("iml") - .withCenterFrequencyMHz(48.246895f) - .withBandwidthMHz(57.293236f) - .withEndPoint(new EndPoint().withIpAddress("jxkcgxxlxsff") - .withEndPointName("cvizqzdwlvw") - .withPort("youpfgfbkj") - .withProtocol(Protocol.UDP)), - new ContactProfileLinkChannel().withName("dyhgkfminsg") - .withCenterFrequencyMHz(17.695457f) - .withBandwidthMHz(79.628006f) - .withEndPoint(new EndPoint().withIpAddress("fttsttk") - .withEndPointName("lahb") - .withPort("actxtgzukxitm") - .withProtocol(Protocol.UDP)), - new ContactProfileLinkChannel().withName("tg") - .withCenterFrequencyMHz(74.6131f) - .withBandwidthMHz(5.9823155f) - .withEndPoint(new EndPoint().withIpAddress("x") - .withEndPointName("rnxrxcpj") - .withPort("isavok") - .withProtocol(Protocol.TCP)))))) - .withTags(mapOf("kqqfk", "atnwxyiopi", "dmligovibrxk", "vscx")) - .withProvisioningState(ContactProfilesPropertiesProvisioningState.CANCELED) - .withMinimumViableContactDuration("o") - .withMinimumElevationDegrees(90.69441F) - .withAutoTrackingConfiguration(AutoTrackingConfiguration.DISABLED) - .withEventHubUri("lnorwmdu") - .withThirdPartyConfigurations(Arrays.asList( - new ContactProfileThirdPartyConfiguration().withProviderName("dxpgpqchiszepnnb") - .withMissionConfiguration("crxgibb"), - new ContactProfileThirdPartyConfiguration().withProviderName("axconfozauo") - .withMissionConfiguration("sukokwbqplhl"))) - .create(); - - Assertions.assertEquals("kciayzri", response.location()); - Assertions.assertEquals("yawfvjlboxq", response.tags().get("kjlmx")); - Assertions.assertEquals(ContactProfilesPropertiesProvisioningState.fromString("Succeeded"), - response.provisioningState()); - Assertions.assertEquals("hjxa", response.minimumViableContactDuration()); - Assertions.assertEquals(30.664253F, response.minimumElevationDegrees()); - Assertions.assertEquals(AutoTrackingConfiguration.X_BAND, response.autoTrackingConfiguration()); - Assertions.assertEquals("lordilmywwtkgkxn", response.eventHubUri()); - Assertions.assertEquals("edabgyvudtjue", response.networkConfiguration().subnetId()); - Assertions.assertEquals("ihxuuwh", response.thirdPartyConfigurations().get(0).providerName()); - Assertions.assertEquals("j", response.thirdPartyConfigurations().get(0).missionConfiguration()); - Assertions.assertEquals("tcyohpfkyrk", response.links().get(0).name()); - Assertions.assertEquals(Polarization.LINEAR_VERTICAL, response.links().get(0).polarization()); - Assertions.assertEquals(Direction.UPLINK, response.links().get(0).direction()); - Assertions.assertEquals(56.479233F, response.links().get(0).gainOverTemperature()); - Assertions.assertEquals(15.116018F, response.links().get(0).eirpdBW()); - Assertions.assertEquals("jkmnwq", response.links().get(0).channels().get(0).name()); - Assertions.assertEquals(94.966415f, response.links().get(0).channels().get(0).centerFrequencyMHz()); - Assertions.assertEquals(87.046394f, response.links().get(0).channels().get(0).bandwidthMHz()); - Assertions.assertEquals("baiyhddviaceg", response.links().get(0).channels().get(0).endPoint().ipAddress()); - Assertions.assertEquals("n", response.links().get(0).channels().get(0).endPoint().endPointName()); - Assertions.assertEquals("ntfpmvmemfnc", response.links().get(0).channels().get(0).endPoint().port()); - Assertions.assertEquals(Protocol.TCP, response.links().get(0).channels().get(0).endPoint().protocol()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesDeleteMockTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesDeleteMockTests.java deleted file mode 100644 index a3c8a1073f72..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.orbital.OrbitalManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContactProfilesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OrbitalManager manager = OrbitalManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.contactProfiles().delete("hhavgrvkffovjz", "pjbi", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesGetByResourceGroupWithResponseMockTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 296ac3192d85..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.orbital.OrbitalManager; -import com.azure.resourcemanager.orbital.models.AutoTrackingConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfile; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesProvisioningState; -import com.azure.resourcemanager.orbital.models.Direction; -import com.azure.resourcemanager.orbital.models.Polarization; -import com.azure.resourcemanager.orbital.models.Protocol; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContactProfilesGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"canceled\",\"minimumViableContactDuration\":\"zlmvfelfktgp\",\"minimumElevationDegrees\":12.967777,\"autoTrackingConfiguration\":\"xBand\",\"eventHubUri\":\"xeznoi\",\"networkConfiguration\":{\"subnetId\":\"brnjwmw\"},\"thirdPartyConfigurations\":[{\"providerName\":\"bsazejjoqka\",\"missionConfiguration\":\"fhsxttaugz\"},{\"providerName\":\"nfaazpxdtnkdmkq\",\"missionConfiguration\":\"jlwuenvrkp\"},{\"providerName\":\"ou\",\"missionConfiguration\":\"ibreb\"},{\"providerName\":\"aays\",\"missionConfiguration\":\"kixqtnqtt\"}],\"links\":[{\"name\":\"lwfffi\",\"polarization\":\"RHCP\",\"direction\":\"Downlink\",\"gainOverTemperature\":43.313293,\"eirpdBW\":15.329981,\"channels\":[{\"name\":\"tedltmmj\",\"centerFrequencyMHz\":65.3647,\"bandwidthMHz\":90.87137,\"endPoint\":{\"ipAddress\":\"eozphv\",\"endPointName\":\"auyqncygupkv\",\"port\":\"p\",\"protocol\":\"UDP\"}}]},{\"name\":\"scw\",\"polarization\":\"LHCP\",\"direction\":\"Uplink\",\"gainOverTemperature\":46.54088,\"eirpdBW\":38.69921,\"channels\":[{\"name\":\"f\",\"centerFrequencyMHz\":60.127544,\"bandwidthMHz\":56.80255,\"endPoint\":{\"ipAddress\":\"txhojujb\",\"endPointName\":\"pelmcuvhixbjxyf\",\"port\":\"n\",\"protocol\":\"UDP\"}},{\"name\":\"r\",\"centerFrequencyMHz\":16.996414,\"bandwidthMHz\":4.770917,\"endPoint\":{\"ipAddress\":\"lsttpkiwkkbnuj\",\"endPointName\":\"ywvtylbfpnc\",\"port\":\"rd\",\"protocol\":\"TCP\"}},{\"name\":\"wiithtywub\",\"centerFrequencyMHz\":41.84369,\"bandwidthMHz\":66.52449,\"endPoint\":{\"ipAddress\":\"ihwqknfdntwjchr\",\"endPointName\":\"goihx\",\"port\":\"mwctondzjluudfd\",\"protocol\":\"UDP\"}},{\"name\":\"gg\",\"centerFrequencyMHz\":72.12507,\"bandwidthMHz\":9.48934,\"endPoint\":{\"ipAddress\":\"bwtovvtgseinqf\",\"endPointName\":\"ufxqknpirgnepttw\",\"port\":\"msniffc\",\"protocol\":\"UDP\"}}]},{\"name\":\"qnrojlpijnkrxfrd\",\"polarization\":\"LHCP\",\"direction\":\"Uplink\",\"gainOverTemperature\":24.058205,\"eirpdBW\":98.63852,\"channels\":[{\"name\":\"zronasxift\",\"centerFrequencyMHz\":8.172721,\"bandwidthMHz\":28.090256,\"endPoint\":{\"ipAddress\":\"yzhftwesgogczh\",\"endPointName\":\"nnxk\",\"port\":\"lgnyhmo\",\"protocol\":\"TCP\"}},{\"name\":\"xkk\",\"centerFrequencyMHz\":35.89206,\"bandwidthMHz\":4.131174,\"endPoint\":{\"ipAddress\":\"rrghxjbdhqxvcxgf\",\"endPointName\":\"pdso\",\"port\":\"bshrnsvbuswd\",\"protocol\":\"TCP\"}}]}]},\"location\":\"ybycnunvj\",\"tags\":{\"rtxdyuxzejnt\":\"kfawnopqgikyz\"},\"id\":\"sewgioilqukr\",\"name\":\"dxtqmieoxo\",\"type\":\"ggufhyaomtb\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OrbitalManager manager = OrbitalManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ContactProfile response = manager.contactProfiles() - .getByResourceGroupWithResponse("afxtsgum", "jglikkxwslolb", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ybycnunvj", response.location()); - Assertions.assertEquals("kfawnopqgikyz", response.tags().get("rtxdyuxzejnt")); - Assertions.assertEquals(ContactProfilesPropertiesProvisioningState.CANCELED, response.provisioningState()); - Assertions.assertEquals("zlmvfelfktgp", response.minimumViableContactDuration()); - Assertions.assertEquals(12.967777F, response.minimumElevationDegrees()); - Assertions.assertEquals(AutoTrackingConfiguration.X_BAND, response.autoTrackingConfiguration()); - Assertions.assertEquals("xeznoi", response.eventHubUri()); - Assertions.assertEquals("brnjwmw", response.networkConfiguration().subnetId()); - Assertions.assertEquals("bsazejjoqka", response.thirdPartyConfigurations().get(0).providerName()); - Assertions.assertEquals("fhsxttaugz", response.thirdPartyConfigurations().get(0).missionConfiguration()); - Assertions.assertEquals("lwfffi", response.links().get(0).name()); - Assertions.assertEquals(Polarization.RHCP, response.links().get(0).polarization()); - Assertions.assertEquals(Direction.DOWNLINK, response.links().get(0).direction()); - Assertions.assertEquals(43.313293F, response.links().get(0).gainOverTemperature()); - Assertions.assertEquals(15.329981F, response.links().get(0).eirpdBW()); - Assertions.assertEquals("tedltmmj", response.links().get(0).channels().get(0).name()); - Assertions.assertEquals(65.3647f, response.links().get(0).channels().get(0).centerFrequencyMHz()); - Assertions.assertEquals(90.87137f, response.links().get(0).channels().get(0).bandwidthMHz()); - Assertions.assertEquals("eozphv", response.links().get(0).channels().get(0).endPoint().ipAddress()); - Assertions.assertEquals("auyqncygupkv", response.links().get(0).channels().get(0).endPoint().endPointName()); - Assertions.assertEquals("p", response.links().get(0).channels().get(0).endPoint().port()); - Assertions.assertEquals(Protocol.UDP, response.links().get(0).channels().get(0).endPoint().protocol()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesListByResourceGroupMockTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesListByResourceGroupMockTests.java deleted file mode 100644 index 1d605db80e9c..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesListByResourceGroupMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.orbital.OrbitalManager; -import com.azure.resourcemanager.orbital.models.AutoTrackingConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfile; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesProvisioningState; -import com.azure.resourcemanager.orbital.models.Direction; -import com.azure.resourcemanager.orbital.models.Polarization; -import com.azure.resourcemanager.orbital.models.Protocol; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContactProfilesListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"canceled\",\"minimumViableContactDuration\":\"mwks\",\"minimumElevationDegrees\":50.755978,\"autoTrackingConfiguration\":\"sBand\",\"eventHubUri\":\"jxv\",\"networkConfiguration\":{\"subnetId\":\"dfcea\"},\"thirdPartyConfigurations\":[{\"providerName\":\"hvygdyftumr\",\"missionConfiguration\":\"wnawjslbiw\"},{\"providerName\":\"ojgcyzt\",\"missionConfiguration\":\"fmznba\"},{\"providerName\":\"qphchqnrnrpxehuw\",\"missionConfiguration\":\"ykqgaifmvik\"}],\"links\":[{\"name\":\"ydv\",\"polarization\":\"linearHorizontal\",\"direction\":\"Downlink\",\"gainOverTemperature\":16.89176,\"eirpdBW\":37.95228,\"channels\":[{\"name\":\"xcv\",\"centerFrequencyMHz\":47.618546,\"bandwidthMHz\":21.644152,\"endPoint\":{\"ipAddress\":\"hnjivo\",\"endPointName\":\"v\",\"port\":\"novqfzge\",\"protocol\":\"UDP\"}},{\"name\":\"dftuljltduce\",\"centerFrequencyMHz\":50.251114,\"bandwidthMHz\":91.42662,\"endPoint\":{\"ipAddress\":\"mczuo\",\"endPointName\":\"ejwcwwqiok\",\"port\":\"ssxmojms\",\"protocol\":\"TCP\"}}]},{\"name\":\"kjprvk\",\"polarization\":\"RHCP\",\"direction\":\"Uplink\",\"gainOverTemperature\":8.026451,\"eirpdBW\":44.8669,\"channels\":[{\"name\":\"x\",\"centerFrequencyMHz\":91.69459,\"bandwidthMHz\":34.803844,\"endPoint\":{\"ipAddress\":\"zheydbsdshmk\",\"endPointName\":\"maehvbbxurip\",\"port\":\"tfnhtbaxkgxywr\",\"protocol\":\"TCP\"}},{\"name\":\"pyklyhpluodpvru\",\"centerFrequencyMHz\":87.415924,\"bandwidthMHz\":23.560375,\"endPoint\":{\"ipAddress\":\"gzibthostgktstv\",\"endPointName\":\"xeclzedqbcvhzlhp\",\"port\":\"odqkdlwwqfb\",\"protocol\":\"UDP\"}}]},{\"name\":\"lkxt\",\"polarization\":\"linearVertical\",\"direction\":\"Downlink\",\"gainOverTemperature\":98.33682,\"eirpdBW\":79.85167,\"channels\":[{\"name\":\"btx\",\"centerFrequencyMHz\":0.37645698,\"bandwidthMHz\":47.412045,\"endPoint\":{\"ipAddress\":\"fwsrtawcoezbrhu\",\"endPointName\":\"skh\",\"port\":\"dyg\",\"protocol\":\"TCP\"}},{\"name\":\"okkqfqjbvleo\",\"centerFrequencyMHz\":90.28293,\"bandwidthMHz\":10.981679,\"endPoint\":{\"ipAddress\":\"luiqtqzfavyvnqq\",\"endPointName\":\"bar\",\"port\":\"euayjkqabqgzsles\",\"protocol\":\"UDP\"}}]}]},\"location\":\"hernntiewdjc\",\"tags\":{\"uffkmrqemvvh\":\"uwrbehwagoh\",\"futacoebjvewzc\":\"xtdr\",\"guaadraufactkahz\":\"znmwcp\"},\"id\":\"v\",\"name\":\"jjziuxxpsh\",\"type\":\"eekulfgslqubkwd\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OrbitalManager manager = OrbitalManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.contactProfiles().listByResourceGroup("qg", "zpnfqntcypsxj", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("hernntiewdjc", response.iterator().next().location()); - Assertions.assertEquals("uwrbehwagoh", response.iterator().next().tags().get("uffkmrqemvvh")); - Assertions.assertEquals(ContactProfilesPropertiesProvisioningState.CANCELED, - response.iterator().next().provisioningState()); - Assertions.assertEquals("mwks", response.iterator().next().minimumViableContactDuration()); - Assertions.assertEquals(50.755978F, response.iterator().next().minimumElevationDegrees()); - Assertions.assertEquals(AutoTrackingConfiguration.S_BAND, - response.iterator().next().autoTrackingConfiguration()); - Assertions.assertEquals("jxv", response.iterator().next().eventHubUri()); - Assertions.assertEquals("dfcea", response.iterator().next().networkConfiguration().subnetId()); - Assertions.assertEquals("hvygdyftumr", - response.iterator().next().thirdPartyConfigurations().get(0).providerName()); - Assertions.assertEquals("wnawjslbiw", - response.iterator().next().thirdPartyConfigurations().get(0).missionConfiguration()); - Assertions.assertEquals("ydv", response.iterator().next().links().get(0).name()); - Assertions.assertEquals(Polarization.LINEAR_HORIZONTAL, - response.iterator().next().links().get(0).polarization()); - Assertions.assertEquals(Direction.DOWNLINK, response.iterator().next().links().get(0).direction()); - Assertions.assertEquals(16.89176F, response.iterator().next().links().get(0).gainOverTemperature()); - Assertions.assertEquals(37.95228F, response.iterator().next().links().get(0).eirpdBW()); - Assertions.assertEquals("xcv", response.iterator().next().links().get(0).channels().get(0).name()); - Assertions.assertEquals(47.618546f, - response.iterator().next().links().get(0).channels().get(0).centerFrequencyMHz()); - Assertions.assertEquals(21.644152f, response.iterator().next().links().get(0).channels().get(0).bandwidthMHz()); - Assertions.assertEquals("hnjivo", - response.iterator().next().links().get(0).channels().get(0).endPoint().ipAddress()); - Assertions.assertEquals("v", - response.iterator().next().links().get(0).channels().get(0).endPoint().endPointName()); - Assertions.assertEquals("novqfzge", - response.iterator().next().links().get(0).channels().get(0).endPoint().port()); - Assertions.assertEquals(Protocol.UDP, - response.iterator().next().links().get(0).channels().get(0).endPoint().protocol()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesListMockTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesListMockTests.java deleted file mode 100644 index 2aa2ce12a925..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesListMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.orbital.OrbitalManager; -import com.azure.resourcemanager.orbital.models.AutoTrackingConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfile; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesProvisioningState; -import com.azure.resourcemanager.orbital.models.Direction; -import com.azure.resourcemanager.orbital.models.Polarization; -import com.azure.resourcemanager.orbital.models.Protocol; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContactProfilesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"creating\",\"minimumViableContactDuration\":\"wxnb\",\"minimumElevationDegrees\":97.90466,\"autoTrackingConfiguration\":\"xBand\",\"eventHubUri\":\"scyhwz\",\"networkConfiguration\":{\"subnetId\":\"g\"},\"thirdPartyConfigurations\":[{\"providerName\":\"jbzbomvzzbtdcq\",\"missionConfiguration\":\"pniyujviyl\"}],\"links\":[{\"name\":\"shfssnrbgyef\",\"polarization\":\"linearVertical\",\"direction\":\"Uplink\",\"gainOverTemperature\":28.691996,\"eirpdBW\":47.278046,\"channels\":[{\"name\":\"fmwncotmrfh\",\"centerFrequencyMHz\":26.720215,\"bandwidthMHz\":60.592484,\"endPoint\":{\"ipAddress\":\"tymoxoftp\",\"endPointName\":\"piwyczuhxacpqjl\",\"port\":\"h\",\"protocol\":\"TCP\"}}]}]},\"location\":\"spskasdvlmfwdgz\",\"tags\":{\"euzvx\":\"ucvpamrs\",\"xmrhu\":\"risjnhnytxifqjz\"},\"id\":\"lw\",\"name\":\"cesutrgjupauut\",\"type\":\"woqhihe\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OrbitalManager manager = OrbitalManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.contactProfiles().list("gjmfxumvfcl", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("spskasdvlmfwdgz", response.iterator().next().location()); - Assertions.assertEquals("ucvpamrs", response.iterator().next().tags().get("euzvx")); - Assertions.assertEquals(ContactProfilesPropertiesProvisioningState.CREATING, - response.iterator().next().provisioningState()); - Assertions.assertEquals("wxnb", response.iterator().next().minimumViableContactDuration()); - Assertions.assertEquals(97.90466F, response.iterator().next().minimumElevationDegrees()); - Assertions.assertEquals(AutoTrackingConfiguration.X_BAND, - response.iterator().next().autoTrackingConfiguration()); - Assertions.assertEquals("scyhwz", response.iterator().next().eventHubUri()); - Assertions.assertEquals("g", response.iterator().next().networkConfiguration().subnetId()); - Assertions.assertEquals("jbzbomvzzbtdcq", - response.iterator().next().thirdPartyConfigurations().get(0).providerName()); - Assertions.assertEquals("pniyujviyl", - response.iterator().next().thirdPartyConfigurations().get(0).missionConfiguration()); - Assertions.assertEquals("shfssnrbgyef", response.iterator().next().links().get(0).name()); - Assertions.assertEquals(Polarization.LINEAR_VERTICAL, response.iterator().next().links().get(0).polarization()); - Assertions.assertEquals(Direction.UPLINK, response.iterator().next().links().get(0).direction()); - Assertions.assertEquals(28.691996F, response.iterator().next().links().get(0).gainOverTemperature()); - Assertions.assertEquals(47.278046F, response.iterator().next().links().get(0).eirpdBW()); - Assertions.assertEquals("fmwncotmrfh", response.iterator().next().links().get(0).channels().get(0).name()); - Assertions.assertEquals(26.720215f, - response.iterator().next().links().get(0).channels().get(0).centerFrequencyMHz()); - Assertions.assertEquals(60.592484f, response.iterator().next().links().get(0).channels().get(0).bandwidthMHz()); - Assertions.assertEquals("tymoxoftp", - response.iterator().next().links().get(0).channels().get(0).endPoint().ipAddress()); - Assertions.assertEquals("piwyczuhxacpqjl", - response.iterator().next().links().get(0).channels().get(0).endPoint().endPointName()); - Assertions.assertEquals("h", response.iterator().next().links().get(0).channels().get(0).endPoint().port()); - Assertions.assertEquals(Protocol.TCP, - response.iterator().next().links().get(0).channels().get(0).endPoint().protocol()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesPropertiesNetworkConfigurationTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesPropertiesNetworkConfigurationTests.java deleted file mode 100644 index df3587bee385..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesPropertiesNetworkConfigurationTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesNetworkConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class ContactProfilesPropertiesNetworkConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContactProfilesPropertiesNetworkConfiguration model = BinaryData.fromString("{\"subnetId\":\"t\"}") - .toObject(ContactProfilesPropertiesNetworkConfiguration.class); - Assertions.assertEquals("t", model.subnetId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContactProfilesPropertiesNetworkConfiguration model - = new ContactProfilesPropertiesNetworkConfiguration().withSubnetId("t"); - model = BinaryData.fromObject(model).toObject(ContactProfilesPropertiesNetworkConfiguration.class); - Assertions.assertEquals("t", model.subnetId()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesPropertiesTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesPropertiesTests.java deleted file mode 100644 index 908ed5e036f0..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesPropertiesTests.java +++ /dev/null @@ -1,287 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.AutoTrackingConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfileLink; -import com.azure.resourcemanager.orbital.models.ContactProfileLinkChannel; -import com.azure.resourcemanager.orbital.models.ContactProfileThirdPartyConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfilesProperties; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesNetworkConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesProvisioningState; -import com.azure.resourcemanager.orbital.models.Direction; -import com.azure.resourcemanager.orbital.models.EndPoint; -import com.azure.resourcemanager.orbital.models.Polarization; -import com.azure.resourcemanager.orbital.models.Protocol; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ContactProfilesPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContactProfilesProperties model = BinaryData.fromString( - "{\"provisioningState\":\"updating\",\"minimumViableContactDuration\":\"hjfbebrjcxe\",\"minimumElevationDegrees\":76.10287,\"autoTrackingConfiguration\":\"disabled\",\"eventHubUri\":\"ttxfvjr\",\"networkConfiguration\":{\"subnetId\":\"i\"},\"thirdPartyConfigurations\":[{\"providerName\":\"xepcyvahfn\",\"missionConfiguration\":\"jky\"},{\"providerName\":\"xjvuujqgidokg\",\"missionConfiguration\":\"ljyoxgvcltb\"},{\"providerName\":\"sncghkjeszz\",\"missionConfiguration\":\"bijhtxfvgxbf\"},{\"providerName\":\"mxnehmp\",\"missionConfiguration\":\"ec\"}],\"links\":[{\"name\":\"odebfqkkrbmpu\",\"polarization\":\"RHCP\",\"direction\":\"Downlink\",\"gainOverTemperature\":78.73024,\"eirpdBW\":59.0843,\"channels\":[{\"name\":\"lfbxzpuzycisp\",\"centerFrequencyMHz\":57.357258,\"bandwidthMHz\":99.49339,\"endPoint\":{\"ipAddress\":\"ahmgkbrp\",\"endPointName\":\"y\",\"port\":\"hibnuqqkpika\",\"protocol\":\"TCP\"},\"modulationConfiguration\":\"vtq\",\"demodulationConfiguration\":\"n\",\"encodingConfiguration\":\"ynhijggme\",\"decodingConfiguration\":\"siarbutrcvpn\"},{\"name\":\"zzmhjrunmpxttd\",\"centerFrequencyMHz\":94.22552,\"bandwidthMHz\":81.04825,\"endPoint\":{\"ipAddress\":\"bnlankxmyskpb\",\"endPointName\":\"enbtkcxywny\",\"port\":\"nrs\",\"protocol\":\"UDP\"},\"modulationConfiguration\":\"qidybyx\",\"demodulationConfiguration\":\"fclhaaxdbabphlwr\",\"encodingConfiguration\":\"fkts\",\"decodingConfiguration\":\"sucocmnyyazttbtw\"},{\"name\":\"rq\",\"centerFrequencyMHz\":28.554081,\"bandwidthMHz\":92.70088,\"endPoint\":{\"ipAddress\":\"dckzywbiexz\",\"endPointName\":\"eyueaxibxujwb\",\"port\":\"qwalmuzyoxaepd\",\"protocol\":\"TCP\"},\"modulationConfiguration\":\"ancuxrhd\",\"demodulationConfiguration\":\"avxbniwdjswztsdb\",\"encodingConfiguration\":\"nxytxh\",\"decodingConfiguration\":\"xbzpfzab\"},{\"name\":\"lcuhxwtctyqiklb\",\"centerFrequencyMHz\":28.630316,\"bandwidthMHz\":48.373898,\"endPoint\":{\"ipAddress\":\"plwzbhvgyugu\",\"endPointName\":\"svmkfssxquk\",\"port\":\"fpl\",\"protocol\":\"TCP\"},\"modulationConfiguration\":\"sxnkjzkdeslpvlo\",\"demodulationConfiguration\":\"i\",\"encodingConfiguration\":\"ghxpkdw\",\"decodingConfiguration\":\"aiuebbaumnyqu\"}]},{\"name\":\"edeojnabc\",\"polarization\":\"linearHorizontal\",\"direction\":\"Downlink\",\"gainOverTemperature\":14.241242,\"eirpdBW\":74.35146,\"channels\":[{\"name\":\"ie\",\"centerFrequencyMHz\":96.578255,\"bandwidthMHz\":51.74012,\"endPoint\":{\"ipAddress\":\"hvpesapskrdqm\",\"endPointName\":\"jjdhtld\",\"port\":\"kyzxuutk\",\"protocol\":\"UDP\"},\"modulationConfiguration\":\"scwsv\",\"demodulationConfiguration\":\"otogtwrupqs\",\"encodingConfiguration\":\"nmic\",\"decodingConfiguration\":\"vce\"},{\"name\":\"vei\",\"centerFrequencyMHz\":97.97487,\"bandwidthMHz\":65.040726,\"endPoint\":{\"ipAddress\":\"notyfjfcnjbkcn\",\"endPointName\":\"dhbt\",\"port\":\"kphywpnvjto\",\"protocol\":\"TCP\"},\"modulationConfiguration\":\"rmclfplphoxu\",\"demodulationConfiguration\":\"rpabg\",\"encodingConfiguration\":\"psbjta\",\"decodingConfiguration\":\"ugxywpmueef\"},{\"name\":\"zwfqkqujidsuyon\",\"centerFrequencyMHz\":73.08737,\"bandwidthMHz\":31.692337,\"endPoint\":{\"ipAddress\":\"laocqxtccmg\",\"endPointName\":\"udxytlmoyrx\",\"port\":\"wfudwpzntxhdzhl\",\"protocol\":\"TCP\"},\"modulationConfiguration\":\"bh\",\"demodulationConfiguration\":\"frlh\",\"encodingConfiguration\":\"sbkyvpycanuzbp\",\"decodingConfiguration\":\"afkuwb\"},{\"name\":\"rnwb\",\"centerFrequencyMHz\":79.5002,\"bandwidthMHz\":35.90838,\"endPoint\":{\"ipAddress\":\"hseyvju\",\"endPointName\":\"rts\",\"port\":\"hspkdeemao\",\"protocol\":\"TCP\"},\"modulationConfiguration\":\"ag\",\"demodulationConfiguration\":\"t\",\"encodingConfiguration\":\"lmqkrhahvlj\",\"decodingConfiguration\":\"haquhcdh\"}]},{\"name\":\"duala\",\"polarization\":\"linearVertical\",\"direction\":\"Uplink\",\"gainOverTemperature\":42.13096,\"eirpdBW\":18.452417,\"channels\":[{\"name\":\"mwsrcrgvxpvgo\",\"centerFrequencyMHz\":89.06268,\"bandwidthMHz\":8.818239,\"endPoint\":{\"ipAddress\":\"fmisg\",\"endPointName\":\"bnbbeldawkz\",\"port\":\"ali\",\"protocol\":\"TCP\"},\"modulationConfiguration\":\"qhakauhashsf\",\"demodulationConfiguration\":\"osow\",\"encodingConfiguration\":\"cugicjoox\",\"decodingConfiguration\":\"ebwpucwwfvo\"},{\"name\":\"bvmeuecivy\",\"centerFrequencyMHz\":56.92287,\"bandwidthMHz\":8.0055895,\"endPoint\":{\"ipAddress\":\"euojgjrwju\",\"endPointName\":\"iotwmcdytdxwit\",\"port\":\"nrjawgqwg\",\"protocol\":\"UDP\"},\"modulationConfiguration\":\"isk\",\"demodulationConfiguration\":\"bkpyc\",\"encodingConfiguration\":\"lwn\",\"decodingConfiguration\":\"hjdauwhvylwz\"},{\"name\":\"tdhxujznbmpowuwp\",\"centerFrequencyMHz\":92.36481,\"bandwidthMHz\":76.77147,\"endPoint\":{\"ipAddress\":\"lve\",\"endPointName\":\"alupjm\",\"port\":\"hfxobbcswsrtj\",\"protocol\":\"UDP\"},\"modulationConfiguration\":\"lrbpbewtghfgbl\",\"demodulationConfiguration\":\"wxzvlvqhjkb\",\"encodingConfiguration\":\"ibtnmxiebwwaloay\",\"decodingConfiguration\":\"gwrtzju\"},{\"name\":\"gwyzm\",\"centerFrequencyMHz\":22.303885,\"bandwidthMHz\":95.666405,\"endPoint\":{\"ipAddress\":\"ongmtsa\",\"endPointName\":\"jcbpwxqpsrknft\",\"port\":\"uvriuhprwm\",\"protocol\":\"UDP\"},\"modulationConfiguration\":\"xqtayriwwro\",\"demodulationConfiguration\":\"bexrmcq\",\"encodingConfiguration\":\"ycnojvknmefqsg\",\"decodingConfiguration\":\"ah\"}]},{\"name\":\"pjyzhpv\",\"polarization\":\"linearVertical\",\"direction\":\"Downlink\",\"gainOverTemperature\":3.2978177,\"eirpdBW\":87.9586,\"channels\":[{\"name\":\"djzlmwlx\",\"centerFrequencyMHz\":12.278867,\"bandwidthMHz\":9.6262455,\"endPoint\":{\"ipAddress\":\"gfhzovawjvzunlut\",\"endPointName\":\"nnprn\",\"port\":\"i\",\"protocol\":\"UDP\"},\"modulationConfiguration\":\"lpjzuaejxdu\",\"demodulationConfiguration\":\"skzbb\",\"encodingConfiguration\":\"zumveekgpwo\",\"decodingConfiguration\":\"hkfpbs\"},{\"name\":\"yofd\",\"centerFrequencyMHz\":13.230478,\"bandwidthMHz\":62.09696,\"endPoint\":{\"ipAddress\":\"us\",\"endPointName\":\"ttouwaboekqvkel\",\"port\":\"smv\",\"protocol\":\"UDP\"},\"modulationConfiguration\":\"yjsflhhcaalnji\",\"demodulationConfiguration\":\"sxyawjoyaqcs\",\"encodingConfiguration\":\"jpkiidzyexznelix\",\"decodingConfiguration\":\"rzt\"},{\"name\":\"o\",\"centerFrequencyMHz\":10.115522,\"bandwidthMHz\":77.96445,\"endPoint\":{\"ipAddress\":\"nxknalaulp\",\"endPointName\":\"ggdtpnapnyiro\",\"port\":\"uhpigvp\",\"protocol\":\"UDP\"},\"modulationConfiguration\":\"gqgitxmedjvcsl\",\"demodulationConfiguration\":\"qwwncw\",\"encodingConfiguration\":\"hxg\",\"decodingConfiguration\":\"rmgucnap\"}]}]}") - .toObject(ContactProfilesProperties.class); - Assertions.assertEquals(ContactProfilesPropertiesProvisioningState.UPDATING, model.provisioningState()); - Assertions.assertEquals("hjfbebrjcxe", model.minimumViableContactDuration()); - Assertions.assertEquals(76.10287F, model.minimumElevationDegrees()); - Assertions.assertEquals(AutoTrackingConfiguration.DISABLED, model.autoTrackingConfiguration()); - Assertions.assertEquals("ttxfvjr", model.eventHubUri()); - Assertions.assertEquals("i", model.networkConfiguration().subnetId()); - Assertions.assertEquals("xepcyvahfn", model.thirdPartyConfigurations().get(0).providerName()); - Assertions.assertEquals("jky", model.thirdPartyConfigurations().get(0).missionConfiguration()); - Assertions.assertEquals("odebfqkkrbmpu", model.links().get(0).name()); - Assertions.assertEquals(Polarization.RHCP, model.links().get(0).polarization()); - Assertions.assertEquals(Direction.DOWNLINK, model.links().get(0).direction()); - Assertions.assertEquals(78.73024F, model.links().get(0).gainOverTemperature()); - Assertions.assertEquals(59.0843F, model.links().get(0).eirpdBW()); - Assertions.assertEquals("lfbxzpuzycisp", model.links().get(0).channels().get(0).name()); - Assertions.assertEquals(57.357258f, model.links().get(0).channels().get(0).centerFrequencyMHz()); - Assertions.assertEquals(99.49339f, model.links().get(0).channels().get(0).bandwidthMHz()); - Assertions.assertEquals("ahmgkbrp", model.links().get(0).channels().get(0).endPoint().ipAddress()); - Assertions.assertEquals("y", model.links().get(0).channels().get(0).endPoint().endPointName()); - Assertions.assertEquals("hibnuqqkpika", model.links().get(0).channels().get(0).endPoint().port()); - Assertions.assertEquals(Protocol.TCP, model.links().get(0).channels().get(0).endPoint().protocol()); - Assertions.assertEquals("vtq", model.links().get(0).channels().get(0).modulationConfiguration()); - Assertions.assertEquals("n", model.links().get(0).channels().get(0).demodulationConfiguration()); - Assertions.assertEquals("ynhijggme", model.links().get(0).channels().get(0).encodingConfiguration()); - Assertions.assertEquals("siarbutrcvpn", model.links().get(0).channels().get(0).decodingConfiguration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContactProfilesProperties model = new ContactProfilesProperties() - .withProvisioningState(ContactProfilesPropertiesProvisioningState.UPDATING) - .withMinimumViableContactDuration("hjfbebrjcxe") - .withMinimumElevationDegrees(76.10287F) - .withAutoTrackingConfiguration(AutoTrackingConfiguration.DISABLED) - .withEventHubUri("ttxfvjr") - .withNetworkConfiguration(new ContactProfilesPropertiesNetworkConfiguration().withSubnetId("i")) - .withThirdPartyConfigurations(Arrays.asList( - new ContactProfileThirdPartyConfiguration().withProviderName("xepcyvahfn") - .withMissionConfiguration("jky"), - new ContactProfileThirdPartyConfiguration().withProviderName("xjvuujqgidokg") - .withMissionConfiguration("ljyoxgvcltb"), - new ContactProfileThirdPartyConfiguration().withProviderName("sncghkjeszz") - .withMissionConfiguration("bijhtxfvgxbf"), - new ContactProfileThirdPartyConfiguration().withProviderName("mxnehmp").withMissionConfiguration("ec"))) - .withLinks(Arrays.asList( - new ContactProfileLink().withName("odebfqkkrbmpu") - .withPolarization(Polarization.RHCP) - .withDirection(Direction.DOWNLINK) - .withGainOverTemperature(78.73024F) - .withEirpdBW(59.0843F) - .withChannels(Arrays.asList( - new ContactProfileLinkChannel().withName("lfbxzpuzycisp") - .withCenterFrequencyMHz(57.357258f) - .withBandwidthMHz(99.49339f) - .withEndPoint(new EndPoint().withIpAddress("ahmgkbrp") - .withEndPointName("y") - .withPort("hibnuqqkpika") - .withProtocol(Protocol.TCP)) - .withModulationConfiguration("vtq") - .withDemodulationConfiguration("n") - .withEncodingConfiguration("ynhijggme") - .withDecodingConfiguration("siarbutrcvpn"), - new ContactProfileLinkChannel().withName("zzmhjrunmpxttd") - .withCenterFrequencyMHz(94.22552f) - .withBandwidthMHz(81.04825f) - .withEndPoint(new EndPoint().withIpAddress("bnlankxmyskpb") - .withEndPointName("enbtkcxywny") - .withPort("nrs") - .withProtocol(Protocol.UDP)) - .withModulationConfiguration("qidybyx") - .withDemodulationConfiguration("fclhaaxdbabphlwr") - .withEncodingConfiguration("fkts") - .withDecodingConfiguration("sucocmnyyazttbtw"), - new ContactProfileLinkChannel().withName("rq") - .withCenterFrequencyMHz(28.554081f) - .withBandwidthMHz(92.70088f) - .withEndPoint(new EndPoint().withIpAddress("dckzywbiexz") - .withEndPointName("eyueaxibxujwb") - .withPort("qwalmuzyoxaepd") - .withProtocol(Protocol.TCP)) - .withModulationConfiguration("ancuxrhd") - .withDemodulationConfiguration("avxbniwdjswztsdb") - .withEncodingConfiguration("nxytxh") - .withDecodingConfiguration("xbzpfzab"), - new ContactProfileLinkChannel().withName("lcuhxwtctyqiklb") - .withCenterFrequencyMHz(28.630316f) - .withBandwidthMHz(48.373898f) - .withEndPoint(new EndPoint().withIpAddress("plwzbhvgyugu") - .withEndPointName("svmkfssxquk") - .withPort("fpl") - .withProtocol(Protocol.TCP)) - .withModulationConfiguration("sxnkjzkdeslpvlo") - .withDemodulationConfiguration("i") - .withEncodingConfiguration("ghxpkdw") - .withDecodingConfiguration("aiuebbaumnyqu"))), - new ContactProfileLink().withName("edeojnabc") - .withPolarization(Polarization.LINEAR_HORIZONTAL) - .withDirection(Direction.DOWNLINK) - .withGainOverTemperature(14.241242F) - .withEirpdBW(74.35146F) - .withChannels(Arrays.asList( - new ContactProfileLinkChannel().withName("ie") - .withCenterFrequencyMHz(96.578255f) - .withBandwidthMHz(51.74012f) - .withEndPoint(new EndPoint().withIpAddress("hvpesapskrdqm") - .withEndPointName("jjdhtld") - .withPort("kyzxuutk") - .withProtocol(Protocol.UDP)) - .withModulationConfiguration("scwsv") - .withDemodulationConfiguration("otogtwrupqs") - .withEncodingConfiguration("nmic") - .withDecodingConfiguration("vce"), - new ContactProfileLinkChannel().withName("vei") - .withCenterFrequencyMHz(97.97487f) - .withBandwidthMHz(65.040726f) - .withEndPoint(new EndPoint().withIpAddress("notyfjfcnjbkcn") - .withEndPointName("dhbt") - .withPort("kphywpnvjto") - .withProtocol(Protocol.TCP)) - .withModulationConfiguration("rmclfplphoxu") - .withDemodulationConfiguration("rpabg") - .withEncodingConfiguration("psbjta") - .withDecodingConfiguration("ugxywpmueef"), - new ContactProfileLinkChannel().withName("zwfqkqujidsuyon") - .withCenterFrequencyMHz(73.08737f) - .withBandwidthMHz(31.692337f) - .withEndPoint(new EndPoint().withIpAddress("laocqxtccmg") - .withEndPointName("udxytlmoyrx") - .withPort("wfudwpzntxhdzhl") - .withProtocol(Protocol.TCP)) - .withModulationConfiguration("bh") - .withDemodulationConfiguration("frlh") - .withEncodingConfiguration("sbkyvpycanuzbp") - .withDecodingConfiguration("afkuwb"), - new ContactProfileLinkChannel().withName("rnwb") - .withCenterFrequencyMHz(79.5002f) - .withBandwidthMHz(35.90838f) - .withEndPoint(new EndPoint().withIpAddress("hseyvju") - .withEndPointName("rts") - .withPort("hspkdeemao") - .withProtocol(Protocol.TCP)) - .withModulationConfiguration("ag") - .withDemodulationConfiguration("t") - .withEncodingConfiguration("lmqkrhahvlj") - .withDecodingConfiguration("haquhcdh"))), - new ContactProfileLink().withName("duala") - .withPolarization(Polarization.LINEAR_VERTICAL) - .withDirection(Direction.UPLINK) - .withGainOverTemperature(42.13096F) - .withEirpdBW(18.452417F) - .withChannels(Arrays.asList( - new ContactProfileLinkChannel().withName("mwsrcrgvxpvgo") - .withCenterFrequencyMHz(89.06268f) - .withBandwidthMHz(8.818239f) - .withEndPoint(new EndPoint().withIpAddress("fmisg") - .withEndPointName("bnbbeldawkz") - .withPort("ali") - .withProtocol(Protocol.TCP)) - .withModulationConfiguration("qhakauhashsf") - .withDemodulationConfiguration("osow") - .withEncodingConfiguration("cugicjoox") - .withDecodingConfiguration("ebwpucwwfvo"), - new ContactProfileLinkChannel().withName("bvmeuecivy") - .withCenterFrequencyMHz(56.92287f) - .withBandwidthMHz(8.0055895f) - .withEndPoint(new EndPoint().withIpAddress("euojgjrwju") - .withEndPointName("iotwmcdytdxwit") - .withPort("nrjawgqwg") - .withProtocol(Protocol.UDP)) - .withModulationConfiguration("isk") - .withDemodulationConfiguration("bkpyc") - .withEncodingConfiguration("lwn") - .withDecodingConfiguration("hjdauwhvylwz"), - new ContactProfileLinkChannel().withName("tdhxujznbmpowuwp") - .withCenterFrequencyMHz(92.36481f) - .withBandwidthMHz(76.77147f) - .withEndPoint(new EndPoint().withIpAddress("lve") - .withEndPointName("alupjm") - .withPort("hfxobbcswsrtj") - .withProtocol(Protocol.UDP)) - .withModulationConfiguration("lrbpbewtghfgbl") - .withDemodulationConfiguration("wxzvlvqhjkb") - .withEncodingConfiguration("ibtnmxiebwwaloay") - .withDecodingConfiguration("gwrtzju"), - new ContactProfileLinkChannel().withName("gwyzm") - .withCenterFrequencyMHz(22.303885f) - .withBandwidthMHz(95.666405f) - .withEndPoint(new EndPoint().withIpAddress("ongmtsa") - .withEndPointName("jcbpwxqpsrknft") - .withPort("uvriuhprwm") - .withProtocol(Protocol.UDP)) - .withModulationConfiguration("xqtayriwwro") - .withDemodulationConfiguration("bexrmcq") - .withEncodingConfiguration("ycnojvknmefqsg") - .withDecodingConfiguration("ah"))), - new ContactProfileLink().withName("pjyzhpv") - .withPolarization(Polarization.LINEAR_VERTICAL) - .withDirection(Direction.DOWNLINK) - .withGainOverTemperature(3.2978177F) - .withEirpdBW(87.9586F) - .withChannels(Arrays.asList( - new ContactProfileLinkChannel().withName("djzlmwlx") - .withCenterFrequencyMHz(12.278867f) - .withBandwidthMHz(9.6262455f) - .withEndPoint(new EndPoint().withIpAddress("gfhzovawjvzunlut") - .withEndPointName("nnprn") - .withPort("i") - .withProtocol(Protocol.UDP)) - .withModulationConfiguration("lpjzuaejxdu") - .withDemodulationConfiguration("skzbb") - .withEncodingConfiguration("zumveekgpwo") - .withDecodingConfiguration("hkfpbs"), - new ContactProfileLinkChannel().withName("yofd") - .withCenterFrequencyMHz(13.230478f) - .withBandwidthMHz(62.09696f) - .withEndPoint(new EndPoint().withIpAddress("us") - .withEndPointName("ttouwaboekqvkel") - .withPort("smv") - .withProtocol(Protocol.UDP)) - .withModulationConfiguration("yjsflhhcaalnji") - .withDemodulationConfiguration("sxyawjoyaqcs") - .withEncodingConfiguration("jpkiidzyexznelix") - .withDecodingConfiguration("rzt"), - new ContactProfileLinkChannel().withName("o") - .withCenterFrequencyMHz(10.115522f) - .withBandwidthMHz(77.96445f) - .withEndPoint(new EndPoint().withIpAddress("nxknalaulp") - .withEndPointName("ggdtpnapnyiro") - .withPort("uhpigvp") - .withProtocol(Protocol.UDP)) - .withModulationConfiguration("gqgitxmedjvcsl") - .withDemodulationConfiguration("qwwncw") - .withEncodingConfiguration("hxg") - .withDecodingConfiguration("rmgucnap"))))); - model = BinaryData.fromObject(model).toObject(ContactProfilesProperties.class); - Assertions.assertEquals(ContactProfilesPropertiesProvisioningState.UPDATING, model.provisioningState()); - Assertions.assertEquals("hjfbebrjcxe", model.minimumViableContactDuration()); - Assertions.assertEquals(76.10287F, model.minimumElevationDegrees()); - Assertions.assertEquals(AutoTrackingConfiguration.DISABLED, model.autoTrackingConfiguration()); - Assertions.assertEquals("ttxfvjr", model.eventHubUri()); - Assertions.assertEquals("i", model.networkConfiguration().subnetId()); - Assertions.assertEquals("xepcyvahfn", model.thirdPartyConfigurations().get(0).providerName()); - Assertions.assertEquals("jky", model.thirdPartyConfigurations().get(0).missionConfiguration()); - Assertions.assertEquals("odebfqkkrbmpu", model.links().get(0).name()); - Assertions.assertEquals(Polarization.RHCP, model.links().get(0).polarization()); - Assertions.assertEquals(Direction.DOWNLINK, model.links().get(0).direction()); - Assertions.assertEquals(78.73024F, model.links().get(0).gainOverTemperature()); - Assertions.assertEquals(59.0843F, model.links().get(0).eirpdBW()); - Assertions.assertEquals("lfbxzpuzycisp", model.links().get(0).channels().get(0).name()); - Assertions.assertEquals(57.357258f, model.links().get(0).channels().get(0).centerFrequencyMHz()); - Assertions.assertEquals(99.49339f, model.links().get(0).channels().get(0).bandwidthMHz()); - Assertions.assertEquals("ahmgkbrp", model.links().get(0).channels().get(0).endPoint().ipAddress()); - Assertions.assertEquals("y", model.links().get(0).channels().get(0).endPoint().endPointName()); - Assertions.assertEquals("hibnuqqkpika", model.links().get(0).channels().get(0).endPoint().port()); - Assertions.assertEquals(Protocol.TCP, model.links().get(0).channels().get(0).endPoint().protocol()); - Assertions.assertEquals("vtq", model.links().get(0).channels().get(0).modulationConfiguration()); - Assertions.assertEquals("n", model.links().get(0).channels().get(0).demodulationConfiguration()); - Assertions.assertEquals("ynhijggme", model.links().get(0).channels().get(0).encodingConfiguration()); - Assertions.assertEquals("siarbutrcvpn", model.links().get(0).channels().get(0).decodingConfiguration()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsCreateMockTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsCreateMockTests.java deleted file mode 100644 index 4ebb51f9fd57..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsCreateMockTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.orbital.OrbitalManager; -import com.azure.resourcemanager.orbital.models.Contact; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesContactProfile; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesProvisioningState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContactsCreateMockTests { - @Test - public void testCreate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"status\":\"providerCancelled\",\"reservationStartTime\":\"2021-08-15T03:14:49Z\",\"reservationEndTime\":\"2021-03-19T20:32:18Z\",\"rxStartTime\":\"2021-09-25T01:08:15Z\",\"rxEndTime\":\"2021-11-19T19:11:53Z\",\"txStartTime\":\"2021-01-24T00:59:15Z\",\"txEndTime\":\"2021-01-08T01:19:04Z\",\"errorMessage\":\"gbmhrixkwmyi\",\"maximumElevationDegrees\":98.3043,\"startAzimuthDegrees\":75.6699,\"endAzimuthDegrees\":12.116205,\"groundStationName\":\"hbpnaixexccbd\",\"startElevationDegrees\":7.074279,\"endElevationDegrees\":59.16115,\"antennaConfiguration\":{\"destinationIp\":\"xdrrvqahqkghtp\",\"sourceIps\":[\"nhyjsv\",\"ycxzbfvoo\"]},\"contactProfile\":{\"id\":\"vrvmtgjqppyost\"}},\"id\":\"nzm\",\"name\":\"hgfipnsxkmcw\",\"type\":\"ekrrjr\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OrbitalManager manager = OrbitalManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Contact response = manager.contacts() - .define("htjsying") - .withExistingSpacecraft("wccsnjvcdwxlpqek", "tn") - .withReservationStartTime(OffsetDateTime.parse("2021-04-16T00:09:41Z")) - .withReservationEndTime(OffsetDateTime.parse("2021-08-15T22:02:46Z")) - .withGroundStationName("kj") - .withContactProfile(new ContactsPropertiesContactProfile().withId("tkkgllqwjy")) - .withProvisioningState(ContactsPropertiesProvisioningState.DELETING) - .create(); - - Assertions.assertEquals(ContactsPropertiesProvisioningState.fromString("Succeeded"), - response.provisioningState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-15T03:14:49Z"), response.reservationStartTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-19T20:32:18Z"), response.reservationEndTime()); - Assertions.assertEquals("hbpnaixexccbd", response.groundStationName()); - Assertions.assertEquals("vrvmtgjqppyost", response.contactProfile().id()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsDeleteMockTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsDeleteMockTests.java deleted file mode 100644 index 8cfe6e417304..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.orbital.OrbitalManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContactsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OrbitalManager manager = OrbitalManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.contacts().delete("vezrypqlmfeo", "erqwkyhkobopg", "edkowepbqpcrfk", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsGetWithResponseMockTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsGetWithResponseMockTests.java deleted file mode 100644 index ad72c769d3a9..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsGetWithResponseMockTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.orbital.OrbitalManager; -import com.azure.resourcemanager.orbital.models.Contact; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesProvisioningState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContactsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"canceled\",\"status\":\"succeeded\",\"reservationStartTime\":\"2021-08-20T02:06:38Z\",\"reservationEndTime\":\"2021-03-18T11:58:55Z\",\"rxStartTime\":\"2021-10-18T15:07:25Z\",\"rxEndTime\":\"2021-11-21T07:49:51Z\",\"txStartTime\":\"2021-01-20T03:55:37Z\",\"txEndTime\":\"2021-05-02T09:33:50Z\",\"errorMessage\":\"dkfw\",\"maximumElevationDegrees\":96.910255,\"startAzimuthDegrees\":46.01294,\"endAzimuthDegrees\":33.797283,\"groundStationName\":\"vkay\",\"startElevationDegrees\":71.229416,\"endElevationDegrees\":28.091461,\"antennaConfiguration\":{\"destinationIp\":\"iatkzwpcnp\",\"sourceIps\":[\"jaesgvvsccya\",\"g\",\"qfhwyg\"]},\"contactProfile\":{\"id\":\"lvdnkfx\"}},\"id\":\"emdwzrmuhapfc\",\"name\":\"dpsqx\",\"type\":\"vpsvuoymgcce\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OrbitalManager manager = OrbitalManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Contact response = manager.contacts() - .getWithResponse("guufzd", "syqtfi", "whbotzingamv", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(ContactsPropertiesProvisioningState.CANCELED, response.provisioningState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-20T02:06:38Z"), response.reservationStartTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-18T11:58:55Z"), response.reservationEndTime()); - Assertions.assertEquals("vkay", response.groundStationName()); - Assertions.assertEquals("lvdnkfx", response.contactProfile().id()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsListMockTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsListMockTests.java deleted file mode 100644 index 17376e127730..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsListMockTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.orbital.OrbitalManager; -import com.azure.resourcemanager.orbital.models.Contact; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesProvisioningState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContactsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"canceled\",\"status\":\"failed\",\"reservationStartTime\":\"2021-07-29T01:36:25Z\",\"reservationEndTime\":\"2021-05-24T12:41:33Z\",\"rxStartTime\":\"2021-04-01T03:58:48Z\",\"rxEndTime\":\"2020-12-28T18:13:42Z\",\"txStartTime\":\"2021-10-21T00:35:55Z\",\"txEndTime\":\"2020-12-22T05:34:35Z\",\"errorMessage\":\"jylwbtlhflsj\",\"maximumElevationDegrees\":49.928276,\"startAzimuthDegrees\":59.380924,\"endAzimuthDegrees\":62.8989,\"groundStationName\":\"vfbgofeljagrqmqh\",\"startElevationDegrees\":31.824005,\"endElevationDegrees\":64.267334,\"antennaConfiguration\":{\"destinationIp\":\"ojnal\",\"sourceIps\":[\"kvtvsexso\"]},\"contactProfile\":{\"id\":\"ueluqhhahhxvrhmz\"}},\"id\":\"pjgwwspug\",\"name\":\"ftqsxhqxujxuk\",\"type\":\"dxdigr\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OrbitalManager manager = OrbitalManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.contacts().list("rjqc", "rgz", "frl", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(ContactsPropertiesProvisioningState.CANCELED, - response.iterator().next().provisioningState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-29T01:36:25Z"), - response.iterator().next().reservationStartTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-24T12:41:33Z"), - response.iterator().next().reservationEndTime()); - Assertions.assertEquals("vfbgofeljagrqmqh", response.iterator().next().groundStationName()); - Assertions.assertEquals("ueluqhhahhxvrhmz", response.iterator().next().contactProfile().id()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsPropertiesAntennaConfigurationTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsPropertiesAntennaConfigurationTests.java deleted file mode 100644 index 0c2cce720368..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsPropertiesAntennaConfigurationTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesAntennaConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ContactsPropertiesAntennaConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContactsPropertiesAntennaConfiguration model - = BinaryData.fromString("{\"destinationIp\":\"cpr\",\"sourceIps\":[\"b\",\"gjvtbv\"]}") - .toObject(ContactsPropertiesAntennaConfiguration.class); - Assertions.assertEquals("cpr", model.destinationIp()); - Assertions.assertEquals("b", model.sourceIps().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContactsPropertiesAntennaConfiguration model - = new ContactsPropertiesAntennaConfiguration().withDestinationIp("cpr") - .withSourceIps(Arrays.asList("b", "gjvtbv")); - model = BinaryData.fromObject(model).toObject(ContactsPropertiesAntennaConfiguration.class); - Assertions.assertEquals("cpr", model.destinationIp()); - Assertions.assertEquals("b", model.sourceIps().get(0)); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsPropertiesContactProfileTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsPropertiesContactProfileTests.java deleted file mode 100644 index c53916701018..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsPropertiesContactProfileTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesContactProfile; -import org.junit.jupiter.api.Assertions; - -public final class ContactsPropertiesContactProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContactsPropertiesContactProfile model - = BinaryData.fromString("{\"id\":\"ysszdnrujqguh\"}").toObject(ContactsPropertiesContactProfile.class); - Assertions.assertEquals("ysszdnrujqguh", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContactsPropertiesContactProfile model = new ContactsPropertiesContactProfile().withId("ysszdnrujqguh"); - model = BinaryData.fromObject(model).toObject(ContactsPropertiesContactProfile.class); - Assertions.assertEquals("ysszdnrujqguh", model.id()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsPropertiesTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsPropertiesTests.java deleted file mode 100644 index 14781b7f648e..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsPropertiesTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.fluent.models.ContactsProperties; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesContactProfile; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesProvisioningState; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class ContactsPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContactsProperties model = BinaryData.fromString( - "{\"provisioningState\":\"failed\",\"status\":\"scheduled\",\"reservationStartTime\":\"2021-07-03T00:59:28Z\",\"reservationEndTime\":\"2020-12-29T19:26:23Z\",\"rxStartTime\":\"2021-07-17T14:29:41Z\",\"rxEndTime\":\"2021-10-23T18:32:55Z\",\"txStartTime\":\"2021-04-11T05:58:57Z\",\"txEndTime\":\"2021-09-17T16:41:16Z\",\"errorMessage\":\"ol\",\"maximumElevationDegrees\":53.948807,\"startAzimuthDegrees\":1.6021609,\"endAzimuthDegrees\":49.08141,\"groundStationName\":\"gbquxigj\",\"startElevationDegrees\":90.50798,\"endElevationDegrees\":53.750427,\"antennaConfiguration\":{\"destinationIp\":\"yfhrtxilnerkujy\",\"sourceIps\":[\"eju\"]},\"contactProfile\":{\"id\":\"fqawrlyxw\"}}") - .toObject(ContactsProperties.class); - Assertions.assertEquals(ContactsPropertiesProvisioningState.FAILED, model.provisioningState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-03T00:59:28Z"), model.reservationStartTime()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-29T19:26:23Z"), model.reservationEndTime()); - Assertions.assertEquals("gbquxigj", model.groundStationName()); - Assertions.assertEquals("fqawrlyxw", model.contactProfile().id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContactsProperties model - = new ContactsProperties().withProvisioningState(ContactsPropertiesProvisioningState.FAILED) - .withReservationStartTime(OffsetDateTime.parse("2021-07-03T00:59:28Z")) - .withReservationEndTime(OffsetDateTime.parse("2020-12-29T19:26:23Z")) - .withGroundStationName("gbquxigj") - .withContactProfile(new ContactsPropertiesContactProfile().withId("fqawrlyxw")); - model = BinaryData.fromObject(model).toObject(ContactsProperties.class); - Assertions.assertEquals(ContactsPropertiesProvisioningState.FAILED, model.provisioningState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-03T00:59:28Z"), model.reservationStartTime()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-29T19:26:23Z"), model.reservationEndTime()); - Assertions.assertEquals("gbquxigj", model.groundStationName()); - Assertions.assertEquals("fqawrlyxw", model.contactProfile().id()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/EndPointTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/EndPointTests.java deleted file mode 100644 index c93d522a0468..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/EndPointTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.EndPoint; -import com.azure.resourcemanager.orbital.models.Protocol; -import org.junit.jupiter.api.Assertions; - -public final class EndPointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EndPoint model = BinaryData.fromString( - "{\"ipAddress\":\"dtws\",\"endPointName\":\"otftpvjzbexilz\",\"port\":\"nfqqnvwp\",\"protocol\":\"UDP\"}") - .toObject(EndPoint.class); - Assertions.assertEquals("dtws", model.ipAddress()); - Assertions.assertEquals("otftpvjzbexilz", model.endPointName()); - Assertions.assertEquals("nfqqnvwp", model.port()); - Assertions.assertEquals(Protocol.UDP, model.protocol()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EndPoint model = new EndPoint().withIpAddress("dtws") - .withEndPointName("otftpvjzbexilz") - .withPort("nfqqnvwp") - .withProtocol(Protocol.UDP); - model = BinaryData.fromObject(model).toObject(EndPoint.class); - Assertions.assertEquals("dtws", model.ipAddress()); - Assertions.assertEquals("otftpvjzbexilz", model.endPointName()); - Assertions.assertEquals("nfqqnvwp", model.port()); - Assertions.assertEquals(Protocol.UDP, model.protocol()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/OperationDisplayTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/OperationDisplayTests.java deleted file mode 100644 index 13d974822689..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/OperationDisplayTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.OperationDisplay; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = BinaryData.fromString( - "{\"provider\":\"yrtih\",\"resource\":\"tijbpzvgnwzsymgl\",\"operation\":\"fcyzkohdbihanufh\",\"description\":\"bj\"}") - .toObject(OperationDisplay.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay(); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/OperationInnerTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/OperationInnerTests.java deleted file mode 100644 index cbc98f83a04e..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/OperationInnerTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.fluent.models.OperationInner; -import com.azure.resourcemanager.orbital.models.OperationDisplay; - -public final class OperationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationInner model = BinaryData.fromString( - "{\"name\":\"usarhmofc\",\"isDataAction\":false,\"display\":{\"provider\":\"urkdtmlx\",\"resource\":\"kuksjtxukcdm\",\"operation\":\"rcryuanzwuxzdxta\",\"description\":\"lhmwhfpmrqobm\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}") - .toObject(OperationInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = new OperationInner().withDisplay(new OperationDisplay()); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/OperationListResultTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/OperationListResultTests.java deleted file mode 100644 index 999f9a3a1eae..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/OperationListResultTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.OperationListResult; - -public final class OperationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationListResult model = BinaryData.fromString( - "{\"value\":[{\"name\":\"quvgjxpybczme\",\"isDataAction\":true,\"display\":{\"provider\":\"pbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"izhwlrxy\",\"isDataAction\":false,\"display\":{\"provider\":\"ijgkdm\",\"resource\":\"azlobcufpdznrbt\",\"operation\":\"qjnqglhqgnufoooj\",\"description\":\"ifsqesaagdfmg\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"rifkwm\",\"isDataAction\":true,\"display\":{\"provider\":\"izntocipao\",\"resource\":\"jpsq\",\"operation\":\"mpoyfd\",\"description\":\"ogknygjofjdd\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}],\"nextLink\":\"upewnwreitjzy\"}") - .toObject(OperationListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model = new OperationListResult(); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/OperationsListMockTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/OperationsListMockTests.java deleted file mode 100644 index f1736868d62c..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/OperationsListMockTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.orbital.OrbitalManager; -import com.azure.resourcemanager.orbital.models.Operation; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"maequiahxicslfa\",\"isDataAction\":false,\"display\":{\"provider\":\"yylhalnswhccsp\",\"resource\":\"aivwitqscywu\",\"operation\":\"woluhczbwemhair\",\"description\":\"rgzdwmsweyp\"},\"origin\":\"system\",\"actionType\":\"Internal\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OrbitalManager manager = OrbitalManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ResourceReferenceTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ResourceReferenceTests.java deleted file mode 100644 index 81cdcae2188f..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ResourceReferenceTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.ResourceReference; -import org.junit.jupiter.api.Assertions; - -public final class ResourceReferenceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceReference model = BinaryData.fromString("{\"id\":\"uouq\"}").toObject(ResourceReference.class); - Assertions.assertEquals("uouq", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceReference model = new ResourceReference().withId("uouq"); - model = BinaryData.fromObject(model).toObject(ResourceReference.class); - Assertions.assertEquals("uouq", model.id()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/SpacecraftsDeleteMockTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/SpacecraftsDeleteMockTests.java deleted file mode 100644 index f277eeadf1ef..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/SpacecraftsDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.orbital.OrbitalManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SpacecraftsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OrbitalManager manager = OrbitalManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.spacecrafts().delete("eeyebi", "ikayuhqlbjbsybb", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/TagsObjectTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/TagsObjectTests.java deleted file mode 100644 index 3e7fd95bb00c..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/TagsObjectTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.TagsObject; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class TagsObjectTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TagsObject model = BinaryData.fromString( - "{\"tags\":{\"fxxypininmayhuy\":\"ofpdvh\",\"mihe\":\"bkpodepooginuv\",\"usivye\":\"gnarxzxtheo\",\"nfygxgispemvtz\":\"cciqihnhungbwjz\"}}") - .toObject(TagsObject.class); - Assertions.assertEquals("ofpdvh", model.tags().get("fxxypininmayhuy")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TagsObject model = new TagsObject().withTags(mapOf("fxxypininmayhuy", "ofpdvh", "mihe", "bkpodepooginuv", - "usivye", "gnarxzxtheo", "nfygxgispemvtz", "cciqihnhungbwjz")); - model = BinaryData.fromObject(model).toObject(TagsObject.class); - Assertions.assertEquals("ofpdvh", model.tags().get("fxxypininmayhuy")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -}