com.azure.resourcemanager.mediaservices.implementation.LiveEventImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-mediaservices Show documentation
Show all versions of azure-resourcemanager-mediaservices Show documentation
This package contains Microsoft Azure SDK for MediaServices Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. This Swagger was generated by the API Framework. Package tag package-account-2023-01.
The newest version!
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.mediaservices.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.mediaservices.fluent.models.LiveEventInner;
import com.azure.resourcemanager.mediaservices.models.CrossSiteAccessPolicies;
import com.azure.resourcemanager.mediaservices.models.LiveEvent;
import com.azure.resourcemanager.mediaservices.models.LiveEventActionInput;
import com.azure.resourcemanager.mediaservices.models.LiveEventEncoding;
import com.azure.resourcemanager.mediaservices.models.LiveEventInput;
import com.azure.resourcemanager.mediaservices.models.LiveEventPreview;
import com.azure.resourcemanager.mediaservices.models.LiveEventResourceState;
import com.azure.resourcemanager.mediaservices.models.LiveEventStatus;
import com.azure.resourcemanager.mediaservices.models.LiveEventStreamEvent;
import com.azure.resourcemanager.mediaservices.models.LiveEventTrackEvent;
import com.azure.resourcemanager.mediaservices.models.LiveEventTranscription;
import com.azure.resourcemanager.mediaservices.models.StreamOptionsFlag;
import java.time.OffsetDateTime;
import java.util.Collections;
import java.util.List;
import java.util.Map;
public final class LiveEventImpl implements LiveEvent, LiveEvent.Definition, LiveEvent.Update {
private LiveEventInner innerObject;
private final com.azure.resourcemanager.mediaservices.MediaServicesManager 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 String description() {
return this.innerModel().description();
}
public LiveEventInput input() {
return this.innerModel().input();
}
public LiveEventPreview preview() {
return this.innerModel().preview();
}
public LiveEventEncoding encoding() {
return this.innerModel().encoding();
}
public List transcriptions() {
List inner = this.innerModel().transcriptions();
if (inner != null) {
return Collections.unmodifiableList(inner);
} else {
return Collections.emptyList();
}
}
public String provisioningState() {
return this.innerModel().provisioningState();
}
public LiveEventResourceState resourceState() {
return this.innerModel().resourceState();
}
public CrossSiteAccessPolicies crossSiteAccessPolicies() {
return this.innerModel().crossSiteAccessPolicies();
}
public Boolean useStaticHostname() {
return this.innerModel().useStaticHostname();
}
public String hostnamePrefix() {
return this.innerModel().hostnamePrefix();
}
public List streamOptions() {
List inner = this.innerModel().streamOptions();
if (inner != null) {
return Collections.unmodifiableList(inner);
} else {
return Collections.emptyList();
}
}
public OffsetDateTime created() {
return this.innerModel().created();
}
public OffsetDateTime lastModified() {
return this.innerModel().lastModified();
}
public Region region() {
return Region.fromName(this.regionName());
}
public String regionName() {
return this.location();
}
public String resourceGroupName() {
return resourceGroupName;
}
public LiveEventInner innerModel() {
return this.innerObject;
}
private com.azure.resourcemanager.mediaservices.MediaServicesManager manager() {
return this.serviceManager;
}
private String resourceGroupName;
private String accountName;
private String liveEventName;
private Boolean createAutoStart;
public LiveEventImpl withExistingMediaservice(String resourceGroupName, String accountName) {
this.resourceGroupName = resourceGroupName;
this.accountName = accountName;
return this;
}
public LiveEvent create() {
this.innerObject = serviceManager.serviceClient()
.getLiveEvents()
.create(resourceGroupName, accountName, liveEventName, this.innerModel(), createAutoStart, Context.NONE);
return this;
}
public LiveEvent create(Context context) {
this.innerObject = serviceManager.serviceClient()
.getLiveEvents()
.create(resourceGroupName, accountName, liveEventName, this.innerModel(), createAutoStart, context);
return this;
}
LiveEventImpl(String name, com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager) {
this.innerObject = new LiveEventInner();
this.serviceManager = serviceManager;
this.liveEventName = name;
this.createAutoStart = null;
}
public LiveEventImpl update() {
return this;
}
public LiveEvent apply() {
this.innerObject = serviceManager.serviceClient()
.getLiveEvents()
.update(resourceGroupName, accountName, liveEventName, this.innerModel(), Context.NONE);
return this;
}
public LiveEvent apply(Context context) {
this.innerObject = serviceManager.serviceClient()
.getLiveEvents()
.update(resourceGroupName, accountName, liveEventName, this.innerModel(), context);
return this;
}
LiveEventImpl(LiveEventInner innerObject,
com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "mediaservices");
this.liveEventName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "liveEvents");
}
public LiveEvent refresh() {
this.innerObject = serviceManager.serviceClient()
.getLiveEvents()
.getWithResponse(resourceGroupName, accountName, liveEventName, Context.NONE)
.getValue();
return this;
}
public LiveEvent refresh(Context context) {
this.innerObject = serviceManager.serviceClient()
.getLiveEvents()
.getWithResponse(resourceGroupName, accountName, liveEventName, context)
.getValue();
return this;
}
public void allocate() {
serviceManager.liveEvents().allocate(resourceGroupName, accountName, liveEventName);
}
public void allocate(Context context) {
serviceManager.liveEvents().allocate(resourceGroupName, accountName, liveEventName, context);
}
public void start() {
serviceManager.liveEvents().start(resourceGroupName, accountName, liveEventName);
}
public void start(Context context) {
serviceManager.liveEvents().start(resourceGroupName, accountName, liveEventName, context);
}
public void stop(LiveEventActionInput parameters) {
serviceManager.liveEvents().stop(resourceGroupName, accountName, liveEventName, parameters);
}
public void stop(LiveEventActionInput parameters, Context context) {
serviceManager.liveEvents().stop(resourceGroupName, accountName, liveEventName, parameters, context);
}
public void reset() {
serviceManager.liveEvents().reset(resourceGroupName, accountName, liveEventName);
}
public void reset(Context context) {
serviceManager.liveEvents().reset(resourceGroupName, accountName, liveEventName, context);
}
public PagedIterable listGetStatus() {
return serviceManager.liveEvents().listGetStatus(resourceGroupName, accountName, liveEventName);
}
public PagedIterable listGetStatus(Context context) {
return serviceManager.liveEvents().listGetStatus(resourceGroupName, accountName, liveEventName, context);
}
public PagedIterable listGetStreamEvents() {
return serviceManager.liveEvents().listGetStreamEvents(resourceGroupName, accountName, liveEventName);
}
public PagedIterable listGetStreamEvents(Context context) {
return serviceManager.liveEvents().listGetStreamEvents(resourceGroupName, accountName, liveEventName, context);
}
public PagedIterable listGetTrackIngestHeartbeats() {
return serviceManager.liveEvents().listGetTrackIngestHeartbeats(resourceGroupName, accountName, liveEventName);
}
public PagedIterable listGetTrackIngestHeartbeats(Context context) {
return serviceManager.liveEvents()
.listGetTrackIngestHeartbeats(resourceGroupName, accountName, liveEventName, context);
}
public LiveEventImpl withRegion(Region location) {
this.innerModel().withLocation(location.toString());
return this;
}
public LiveEventImpl withRegion(String location) {
this.innerModel().withLocation(location);
return this;
}
public LiveEventImpl withTags(Map tags) {
this.innerModel().withTags(tags);
return this;
}
public LiveEventImpl withDescription(String description) {
this.innerModel().withDescription(description);
return this;
}
public LiveEventImpl withInput(LiveEventInput input) {
this.innerModel().withInput(input);
return this;
}
public LiveEventImpl withPreview(LiveEventPreview preview) {
this.innerModel().withPreview(preview);
return this;
}
public LiveEventImpl withEncoding(LiveEventEncoding encoding) {
this.innerModel().withEncoding(encoding);
return this;
}
public LiveEventImpl withTranscriptions(List transcriptions) {
this.innerModel().withTranscriptions(transcriptions);
return this;
}
public LiveEventImpl withCrossSiteAccessPolicies(CrossSiteAccessPolicies crossSiteAccessPolicies) {
this.innerModel().withCrossSiteAccessPolicies(crossSiteAccessPolicies);
return this;
}
public LiveEventImpl withUseStaticHostname(Boolean useStaticHostname) {
this.innerModel().withUseStaticHostname(useStaticHostname);
return this;
}
public LiveEventImpl withHostnamePrefix(String hostnamePrefix) {
this.innerModel().withHostnamePrefix(hostnamePrefix);
return this;
}
public LiveEventImpl withStreamOptions(List streamOptions) {
this.innerModel().withStreamOptions(streamOptions);
return this;
}
public LiveEventImpl withAutoStart(Boolean autoStart) {
this.createAutoStart = autoStart;
return this;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy