github.com/openshift-online/ocm-sdk-go@v0.1.473/accountsmgmt/v1/root_client.go (about)

     1  /*
     2  Copyright (c) 2020 Red Hat, Inc.
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8    http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  
    17  // IMPORTANT: This file has been generated automatically, refrain from modifying it manually as all
    18  // your changes will be lost when the file is generated again.
    19  
    20  package v1 // github.com/openshift-online/ocm-sdk-go/accountsmgmt/v1
    21  
    22  import (
    23  	"net/http"
    24  	"path"
    25  )
    26  
    27  // Client is the client of the 'root' resource.
    28  //
    29  // Root of the tree of resources of the clusters management service.
    30  type Client struct {
    31  	transport http.RoundTripper
    32  	path      string
    33  }
    34  
    35  // NewClient creates a new client for the 'root'
    36  // resource using the given transport to send the requests and receive the
    37  // responses.
    38  func NewClient(transport http.RoundTripper, path string) *Client {
    39  	return &Client{
    40  		transport: transport,
    41  		path:      path,
    42  	}
    43  }
    44  
    45  // Creates a new request for the method that retrieves the metadata.
    46  func (c *Client) Get() *MetadataRequest {
    47  	return &MetadataRequest{
    48  		transport: c.transport,
    49  		path:      c.path,
    50  	}
    51  }
    52  
    53  // AccessToken returns the target 'access_token' resource.
    54  //
    55  // Reference to the resource that manages generates access tokens.
    56  func (c *Client) AccessToken() *AccessTokenClient {
    57  	return NewAccessTokenClient(
    58  		c.transport,
    59  		path.Join(c.path, "access_token"),
    60  	)
    61  }
    62  
    63  // Accounts returns the target 'accounts' resource.
    64  //
    65  // Reference to the resource that manages the collection of accounts.
    66  func (c *Client) Accounts() *AccountsClient {
    67  	return NewAccountsClient(
    68  		c.transport,
    69  		path.Join(c.path, "accounts"),
    70  	)
    71  }
    72  
    73  // BillingModels returns the target 'billing_models' resource.
    74  //
    75  // Reference to the resource that manages billing models.
    76  func (c *Client) BillingModels() *BillingModelsClient {
    77  	return NewBillingModelsClient(
    78  		c.transport,
    79  		path.Join(c.path, "billing_models"),
    80  	)
    81  }
    82  
    83  // Capabilities returns the target 'capabilities' resource.
    84  //
    85  // Reference to the resource that manages the collection of capabilities.
    86  func (c *Client) Capabilities() *CapabilitiesClient {
    87  	return NewCapabilitiesClient(
    88  		c.transport,
    89  		path.Join(c.path, "capabilities"),
    90  	)
    91  }
    92  
    93  // CloudResources returns the target 'cloud_resources' resource.
    94  //
    95  // Reference to the resource that manages the collection of cloud resources.
    96  func (c *Client) CloudResources() *CloudResourcesClient {
    97  	return NewCloudResourcesClient(
    98  		c.transport,
    99  		path.Join(c.path, "cloud_resources"),
   100  	)
   101  }
   102  
   103  // ClusterAuthorizations returns the target 'cluster_authorizations' resource.
   104  //
   105  // Reference to the resource that manages cluster authorizations.
   106  func (c *Client) ClusterAuthorizations() *ClusterAuthorizationsClient {
   107  	return NewClusterAuthorizationsClient(
   108  		c.transport,
   109  		path.Join(c.path, "cluster_authorizations"),
   110  	)
   111  }
   112  
   113  // ClusterRegistrations returns the target 'cluster_registrations' resource.
   114  //
   115  // Reference to the resource that manages cluster registrations.
   116  func (c *Client) ClusterRegistrations() *ClusterRegistrationsClient {
   117  	return NewClusterRegistrationsClient(
   118  		c.transport,
   119  		path.Join(c.path, "cluster_registrations"),
   120  	)
   121  }
   122  
   123  // CurrentAccess returns the target 'roles' resource.
   124  //
   125  // Reference to the resource that manages the current authenticated
   126  // account.
   127  func (c *Client) CurrentAccess() *RolesClient {
   128  	return NewRolesClient(
   129  		c.transport,
   130  		path.Join(c.path, "current_access"),
   131  	)
   132  }
   133  
   134  // CurrentAccount returns the target 'current_account' resource.
   135  //
   136  // Reference to the resource that manages the current authenticated
   137  // account.
   138  func (c *Client) CurrentAccount() *CurrentAccountClient {
   139  	return NewCurrentAccountClient(
   140  		c.transport,
   141  		path.Join(c.path, "current_account"),
   142  	)
   143  }
   144  
   145  // DefaultCapabilities returns the target 'default_capabilities' resource.
   146  //
   147  // Reference to the resource that manages the collection of default capabilities.
   148  func (c *Client) DefaultCapabilities() *DefaultCapabilitiesClient {
   149  	return NewDefaultCapabilitiesClient(
   150  		c.transport,
   151  		path.Join(c.path, "default_capabilities"),
   152  	)
   153  }
   154  
   155  // DeletedSubscriptions returns the target 'deleted_subscriptions' resource.
   156  //
   157  // Reference to the resource that manages the collection of deleted subscriptions.
   158  func (c *Client) DeletedSubscriptions() *DeletedSubscriptionsClient {
   159  	return NewDeletedSubscriptionsClient(
   160  		c.transport,
   161  		path.Join(c.path, "deleted_subscriptions"),
   162  	)
   163  }
   164  
   165  // FeatureToggles returns the target 'feature_toggles' resource.
   166  //
   167  // Reference to the resource that manages feature toggles.
   168  func (c *Client) FeatureToggles() *FeatureTogglesClient {
   169  	return NewFeatureTogglesClient(
   170  		c.transport,
   171  		path.Join(c.path, "feature_toggles"),
   172  	)
   173  }
   174  
   175  // Labels returns the target 'labels' resource.
   176  //
   177  // Reference to the resource that manages the collection of labels.
   178  func (c *Client) Labels() *LabelsClient {
   179  	return NewLabelsClient(
   180  		c.transport,
   181  		path.Join(c.path, "labels"),
   182  	)
   183  }
   184  
   185  // NotifyDetails returns the target 'notify_details' resource.
   186  //
   187  // Reference to the resource that manages the notifications details.
   188  func (c *Client) NotifyDetails() *NotifyDetailsClient {
   189  	return NewNotifyDetailsClient(
   190  		c.transport,
   191  		path.Join(c.path, "notify_details"),
   192  	)
   193  }
   194  
   195  // Organizations returns the target 'organizations' resource.
   196  //
   197  // Reference to the resource that manages the collection of
   198  // organizations.
   199  func (c *Client) Organizations() *OrganizationsClient {
   200  	return NewOrganizationsClient(
   201  		c.transport,
   202  		path.Join(c.path, "organizations"),
   203  	)
   204  }
   205  
   206  // Permissions returns the target 'permissions' resource.
   207  //
   208  // Reference to the resource that manages the collection of permissions.
   209  func (c *Client) Permissions() *PermissionsClient {
   210  	return NewPermissionsClient(
   211  		c.transport,
   212  		path.Join(c.path, "permissions"),
   213  	)
   214  }
   215  
   216  // PullSecrets returns the target 'pull_secrets' resource.
   217  //
   218  // Reference to the resource that manages generates access tokens.
   219  func (c *Client) PullSecrets() *PullSecretsClient {
   220  	return NewPullSecretsClient(
   221  		c.transport,
   222  		path.Join(c.path, "pull_secrets"),
   223  	)
   224  }
   225  
   226  // QuotaAuthorizations returns the target 'quota_authorizations' resource.
   227  //
   228  // Reference to the resource that manages quota authorizations.
   229  func (c *Client) QuotaAuthorizations() *QuotaAuthorizationsClient {
   230  	return NewQuotaAuthorizationsClient(
   231  		c.transport,
   232  		path.Join(c.path, "quota_authorizations"),
   233  	)
   234  }
   235  
   236  // Registries returns the target 'registries' resource.
   237  //
   238  // Reference to the resource that manages the collection of registries.
   239  func (c *Client) Registries() *RegistriesClient {
   240  	return NewRegistriesClient(
   241  		c.transport,
   242  		path.Join(c.path, "registries"),
   243  	)
   244  }
   245  
   246  // RegistryCredentials returns the target 'registry_credentials' resource.
   247  //
   248  // Reference to the resource that manages the collection of registry
   249  // credentials.
   250  func (c *Client) RegistryCredentials() *RegistryCredentialsClient {
   251  	return NewRegistryCredentialsClient(
   252  		c.transport,
   253  		path.Join(c.path, "registry_credentials"),
   254  	)
   255  }
   256  
   257  // ResourceQuota returns the target 'resource_quotas' resource.
   258  //
   259  // Reference to the resource that manages the collection of resource
   260  // quota.
   261  func (c *Client) ResourceQuota() *ResourceQuotasClient {
   262  	return NewResourceQuotasClient(
   263  		c.transport,
   264  		path.Join(c.path, "resource_quota"),
   265  	)
   266  }
   267  
   268  // RoleBindings returns the target 'role_bindings' resource.
   269  //
   270  // Reference to the resource that manages the collection of role
   271  // bindings.
   272  func (c *Client) RoleBindings() *RoleBindingsClient {
   273  	return NewRoleBindingsClient(
   274  		c.transport,
   275  		path.Join(c.path, "role_bindings"),
   276  	)
   277  }
   278  
   279  // Roles returns the target 'roles' resource.
   280  //
   281  // Reference to the resource that manages the collection of roles.
   282  func (c *Client) Roles() *RolesClient {
   283  	return NewRolesClient(
   284  		c.transport,
   285  		path.Join(c.path, "roles"),
   286  	)
   287  }
   288  
   289  // SkuRules returns the target 'sku_rules' resource.
   290  //
   291  // Reference to the resource that manages the collection of
   292  // Sku Rules
   293  func (c *Client) SkuRules() *SkuRulesClient {
   294  	return NewSkuRulesClient(
   295  		c.transport,
   296  		path.Join(c.path, "sku_rules"),
   297  	)
   298  }
   299  
   300  // Subscriptions returns the target 'subscriptions' resource.
   301  //
   302  // Reference to the resource that manages the collection of
   303  // subscriptions.
   304  func (c *Client) Subscriptions() *SubscriptionsClient {
   305  	return NewSubscriptionsClient(
   306  		c.transport,
   307  		path.Join(c.path, "subscriptions"),
   308  	)
   309  }
   310  
   311  // SupportCases returns the target 'support_cases' resource.
   312  //
   313  // Reference to the resource that manages the support cases.
   314  func (c *Client) SupportCases() *SupportCasesClient {
   315  	return NewSupportCasesClient(
   316  		c.transport,
   317  		path.Join(c.path, "support_cases"),
   318  	)
   319  }
   320  
   321  // TokenAuthorization returns the target 'token_authorization' resource.
   322  //
   323  // Reference to the resource that manages token authorization.
   324  func (c *Client) TokenAuthorization() *TokenAuthorizationClient {
   325  	return NewTokenAuthorizationClient(
   326  		c.transport,
   327  		path.Join(c.path, "token_authorization"),
   328  	)
   329  }