All Downloads are FREE. Search and download functionalities are using the official Maven repository.

zio.aws.emrcontainers.EmrContainersMock.scala Maven / Gradle / Ivy

The newest version!
package zio.aws.emrcontainers
import zio.aws.emrcontainers.model.StartJobRunResponse.ReadOnly
import zio.aws.emrcontainers.model.{
  ListJobTemplatesRequest,
  CreateJobTemplateRequest,
  CreateVirtualClusterRequest,
  GetManagedEndpointSessionCredentialsRequest,
  DeleteManagedEndpointRequest,
  DescribeJobTemplateRequest,
  ListJobRunsRequest,
  StartJobRunRequest,
  DescribeJobRunRequest,
  ListManagedEndpointsRequest,
  DescribeSecurityConfigurationRequest,
  ListTagsForResourceRequest,
  ListVirtualClustersRequest,
  DeleteVirtualClusterRequest,
  DeleteJobTemplateRequest,
  UntagResourceRequest,
  DescribeVirtualClusterRequest,
  CancelJobRunRequest,
  ListSecurityConfigurationsRequest,
  DescribeManagedEndpointRequest,
  CreateSecurityConfigurationRequest,
  TagResourceRequest,
  CreateManagedEndpointRequest
}
import zio.mock.{Proxy, Mock}
import zio.aws.core.AwsError
import zio.aws.core.aspects.AwsCallAspect
import zio.{IO, ZEnvironment, URLayer}
import software.amazon.awssdk.services.emrcontainers.EmrContainersAsyncClient
import zio.stream.ZStream
object EmrContainersMock extends Mock[EmrContainers] {
  object CreateManagedEndpoint
      extends Effect[
        CreateManagedEndpointRequest,
        AwsError,
        zio.aws.emrcontainers.model.CreateManagedEndpointResponse.ReadOnly
      ]
  object ListJobTemplates
      extends Stream[
        ListJobTemplatesRequest,
        AwsError,
        zio.aws.emrcontainers.model.JobTemplate.ReadOnly
      ]
  object ListJobTemplatesPaginated
      extends Effect[
        ListJobTemplatesRequest,
        AwsError,
        zio.aws.emrcontainers.model.ListJobTemplatesResponse.ReadOnly
      ]
  object ListVirtualClusters
      extends Stream[
        ListVirtualClustersRequest,
        AwsError,
        zio.aws.emrcontainers.model.VirtualCluster.ReadOnly
      ]
  object ListVirtualClustersPaginated
      extends Effect[
        ListVirtualClustersRequest,
        AwsError,
        zio.aws.emrcontainers.model.ListVirtualClustersResponse.ReadOnly
      ]
  object DescribeJobRun
      extends Effect[
        DescribeJobRunRequest,
        AwsError,
        zio.aws.emrcontainers.model.DescribeJobRunResponse.ReadOnly
      ]
  object ListJobRuns
      extends Stream[
        ListJobRunsRequest,
        AwsError,
        zio.aws.emrcontainers.model.JobRun.ReadOnly
      ]
  object ListJobRunsPaginated
      extends Effect[
        ListJobRunsRequest,
        AwsError,
        zio.aws.emrcontainers.model.ListJobRunsResponse.ReadOnly
      ]
  object DeleteVirtualCluster
      extends Effect[
        DeleteVirtualClusterRequest,
        AwsError,
        zio.aws.emrcontainers.model.DeleteVirtualClusterResponse.ReadOnly
      ]
  object DeleteJobTemplate
      extends Effect[
        DeleteJobTemplateRequest,
        AwsError,
        zio.aws.emrcontainers.model.DeleteJobTemplateResponse.ReadOnly
      ]
  object CreateVirtualCluster
      extends Effect[
        CreateVirtualClusterRequest,
        AwsError,
        zio.aws.emrcontainers.model.CreateVirtualClusterResponse.ReadOnly
      ]
  object ListSecurityConfigurations
      extends Stream[
        ListSecurityConfigurationsRequest,
        AwsError,
        zio.aws.emrcontainers.model.SecurityConfiguration.ReadOnly
      ]
  object ListSecurityConfigurationsPaginated
      extends Effect[
        ListSecurityConfigurationsRequest,
        AwsError,
        zio.aws.emrcontainers.model.ListSecurityConfigurationsResponse.ReadOnly
      ]
  object CancelJobRun
      extends Effect[
        CancelJobRunRequest,
        AwsError,
        zio.aws.emrcontainers.model.CancelJobRunResponse.ReadOnly
      ]
  object DescribeJobTemplate
      extends Effect[
        DescribeJobTemplateRequest,
        AwsError,
        zio.aws.emrcontainers.model.DescribeJobTemplateResponse.ReadOnly
      ]
  object ListManagedEndpoints
      extends Stream[
        ListManagedEndpointsRequest,
        AwsError,
        zio.aws.emrcontainers.model.Endpoint.ReadOnly
      ]
  object ListManagedEndpointsPaginated
      extends Effect[
        ListManagedEndpointsRequest,
        AwsError,
        zio.aws.emrcontainers.model.ListManagedEndpointsResponse.ReadOnly
      ]
  object UntagResource
      extends Effect[
        UntagResourceRequest,
        AwsError,
        zio.aws.emrcontainers.model.UntagResourceResponse.ReadOnly
      ]
  object CreateSecurityConfiguration
      extends Effect[
        CreateSecurityConfigurationRequest,
        AwsError,
        zio.aws.emrcontainers.model.CreateSecurityConfigurationResponse.ReadOnly
      ]
  object DescribeSecurityConfiguration
      extends Effect[
        DescribeSecurityConfigurationRequest,
        AwsError,
        zio.aws.emrcontainers.model.DescribeSecurityConfigurationResponse.ReadOnly
      ]
  object DescribeVirtualCluster
      extends Effect[
        DescribeVirtualClusterRequest,
        AwsError,
        zio.aws.emrcontainers.model.DescribeVirtualClusterResponse.ReadOnly
      ]
  object DeleteManagedEndpoint
      extends Effect[
        DeleteManagedEndpointRequest,
        AwsError,
        zio.aws.emrcontainers.model.DeleteManagedEndpointResponse.ReadOnly
      ]
  object ListTagsForResource
      extends Effect[
        ListTagsForResourceRequest,
        AwsError,
        zio.aws.emrcontainers.model.ListTagsForResourceResponse.ReadOnly
      ]
  object TagResource
      extends Effect[
        TagResourceRequest,
        AwsError,
        zio.aws.emrcontainers.model.TagResourceResponse.ReadOnly
      ]
  object GetManagedEndpointSessionCredentials
      extends Effect[
        GetManagedEndpointSessionCredentialsRequest,
        AwsError,
        zio.aws.emrcontainers.model.GetManagedEndpointSessionCredentialsResponse.ReadOnly
      ]
  object StartJobRun extends Effect[StartJobRunRequest, AwsError, ReadOnly]
  object DescribeManagedEndpoint
      extends Effect[
        DescribeManagedEndpointRequest,
        AwsError,
        zio.aws.emrcontainers.model.DescribeManagedEndpointResponse.ReadOnly
      ]
  object CreateJobTemplate
      extends Effect[
        CreateJobTemplateRequest,
        AwsError,
        zio.aws.emrcontainers.model.CreateJobTemplateResponse.ReadOnly
      ]
  val compose: URLayer[Proxy, EmrContainers] = zio.ZLayer {
    zio.ZIO.service[Proxy].flatMap { proxy =>
      withRuntime[Proxy, EmrContainers] { rts =>
        zio.ZIO.succeed {
          new EmrContainers {
            val api: EmrContainersAsyncClient = null
            def withAspect[R1](
                newAspect: AwsCallAspect[R1],
                r: ZEnvironment[R1]
            ): EmrContainers = this
            def createManagedEndpoint(
                request: CreateManagedEndpointRequest
            ): IO[
              AwsError,
              zio.aws.emrcontainers.model.CreateManagedEndpointResponse.ReadOnly
            ] = proxy(CreateManagedEndpoint, request)
            def listJobTemplates(request: ListJobTemplatesRequest): ZStream[
              Any,
              AwsError,
              zio.aws.emrcontainers.model.JobTemplate.ReadOnly
            ] = zio.Unsafe.unsafe { implicit u =>
              rts.unsafe
                .run {
                  proxy(ListJobTemplates, request)
                }
                .getOrThrowFiberFailure()
            }
            def listJobTemplatesPaginated(request: ListJobTemplatesRequest): IO[
              AwsError,
              zio.aws.emrcontainers.model.ListJobTemplatesResponse.ReadOnly
            ] = proxy(ListJobTemplatesPaginated, request)
            def listVirtualClusters(
                request: ListVirtualClustersRequest
            ): ZStream[
              Any,
              AwsError,
              zio.aws.emrcontainers.model.VirtualCluster.ReadOnly
            ] = zio.Unsafe.unsafe { implicit u =>
              rts.unsafe
                .run {
                  proxy(ListVirtualClusters, request)
                }
                .getOrThrowFiberFailure()
            }
            def listVirtualClustersPaginated(
                request: ListVirtualClustersRequest
            ): IO[
              AwsError,
              zio.aws.emrcontainers.model.ListVirtualClustersResponse.ReadOnly
            ] = proxy(ListVirtualClustersPaginated, request)
            def describeJobRun(request: DescribeJobRunRequest): IO[
              AwsError,
              zio.aws.emrcontainers.model.DescribeJobRunResponse.ReadOnly
            ] = proxy(DescribeJobRun, request)
            def listJobRuns(request: ListJobRunsRequest): ZStream[
              Any,
              AwsError,
              zio.aws.emrcontainers.model.JobRun.ReadOnly
            ] = zio.Unsafe.unsafe { implicit u =>
              rts.unsafe
                .run {
                  proxy(ListJobRuns, request)
                }
                .getOrThrowFiberFailure()
            }
            def listJobRunsPaginated(request: ListJobRunsRequest): IO[
              AwsError,
              zio.aws.emrcontainers.model.ListJobRunsResponse.ReadOnly
            ] = proxy(ListJobRunsPaginated, request)
            def deleteVirtualCluster(request: DeleteVirtualClusterRequest): IO[
              AwsError,
              zio.aws.emrcontainers.model.DeleteVirtualClusterResponse.ReadOnly
            ] = proxy(DeleteVirtualCluster, request)
            def deleteJobTemplate(request: DeleteJobTemplateRequest): IO[
              AwsError,
              zio.aws.emrcontainers.model.DeleteJobTemplateResponse.ReadOnly
            ] = proxy(DeleteJobTemplate, request)
            def createVirtualCluster(request: CreateVirtualClusterRequest): IO[
              AwsError,
              zio.aws.emrcontainers.model.CreateVirtualClusterResponse.ReadOnly
            ] = proxy(CreateVirtualCluster, request)
            def listSecurityConfigurations(
                request: ListSecurityConfigurationsRequest
            ): ZStream[
              Any,
              AwsError,
              zio.aws.emrcontainers.model.SecurityConfiguration.ReadOnly
            ] = zio.Unsafe.unsafe { implicit u =>
              rts.unsafe
                .run {
                  proxy(ListSecurityConfigurations, request)
                }
                .getOrThrowFiberFailure()
            }
            def listSecurityConfigurationsPaginated(
                request: ListSecurityConfigurationsRequest
            ): IO[
              AwsError,
              zio.aws.emrcontainers.model.ListSecurityConfigurationsResponse.ReadOnly
            ] = proxy(ListSecurityConfigurationsPaginated, request)
            def cancelJobRun(request: CancelJobRunRequest): IO[
              AwsError,
              zio.aws.emrcontainers.model.CancelJobRunResponse.ReadOnly
            ] = proxy(CancelJobRun, request)
            def describeJobTemplate(request: DescribeJobTemplateRequest): IO[
              AwsError,
              zio.aws.emrcontainers.model.DescribeJobTemplateResponse.ReadOnly
            ] = proxy(DescribeJobTemplate, request)
            def listManagedEndpoints(
                request: ListManagedEndpointsRequest
            ): ZStream[
              Any,
              AwsError,
              zio.aws.emrcontainers.model.Endpoint.ReadOnly
            ] = zio.Unsafe.unsafe { implicit u =>
              rts.unsafe
                .run {
                  proxy(ListManagedEndpoints, request)
                }
                .getOrThrowFiberFailure()
            }
            def listManagedEndpointsPaginated(
                request: ListManagedEndpointsRequest
            ): IO[
              AwsError,
              zio.aws.emrcontainers.model.ListManagedEndpointsResponse.ReadOnly
            ] = proxy(ListManagedEndpointsPaginated, request)
            def untagResource(request: UntagResourceRequest): IO[
              AwsError,
              zio.aws.emrcontainers.model.UntagResourceResponse.ReadOnly
            ] = proxy(UntagResource, request)
            def createSecurityConfiguration(
                request: CreateSecurityConfigurationRequest
            ): IO[
              AwsError,
              zio.aws.emrcontainers.model.CreateSecurityConfigurationResponse.ReadOnly
            ] = proxy(CreateSecurityConfiguration, request)
            def describeSecurityConfiguration(
                request: DescribeSecurityConfigurationRequest
            ): IO[
              AwsError,
              zio.aws.emrcontainers.model.DescribeSecurityConfigurationResponse.ReadOnly
            ] = proxy(DescribeSecurityConfiguration, request)
            def describeVirtualCluster(
                request: DescribeVirtualClusterRequest
            ): IO[
              AwsError,
              zio.aws.emrcontainers.model.DescribeVirtualClusterResponse.ReadOnly
            ] = proxy(DescribeVirtualCluster, request)
            def deleteManagedEndpoint(
                request: DeleteManagedEndpointRequest
            ): IO[
              AwsError,
              zio.aws.emrcontainers.model.DeleteManagedEndpointResponse.ReadOnly
            ] = proxy(DeleteManagedEndpoint, request)
            def listTagsForResource(request: ListTagsForResourceRequest): IO[
              AwsError,
              zio.aws.emrcontainers.model.ListTagsForResourceResponse.ReadOnly
            ] = proxy(ListTagsForResource, request)
            def tagResource(request: TagResourceRequest): IO[
              AwsError,
              zio.aws.emrcontainers.model.TagResourceResponse.ReadOnly
            ] = proxy(TagResource, request)
            def getManagedEndpointSessionCredentials(
                request: GetManagedEndpointSessionCredentialsRequest
            ): IO[
              AwsError,
              zio.aws.emrcontainers.model.GetManagedEndpointSessionCredentialsResponse.ReadOnly
            ] = proxy(GetManagedEndpointSessionCredentials, request)
            def startJobRun(
                request: StartJobRunRequest
            ): IO[AwsError, ReadOnly] = proxy(StartJobRun, request)
            def describeManagedEndpoint(
                request: DescribeManagedEndpointRequest
            ): IO[
              AwsError,
              zio.aws.emrcontainers.model.DescribeManagedEndpointResponse.ReadOnly
            ] = proxy(DescribeManagedEndpoint, request)
            def createJobTemplate(request: CreateJobTemplateRequest): IO[
              AwsError,
              zio.aws.emrcontainers.model.CreateJobTemplateResponse.ReadOnly
            ] = proxy(CreateJobTemplate, request)
          }
        }
      }
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy