github.com/digitalocean/go-netbox@v0.0.2/netbox/client/tenancy/tenancy_client.go (about)

     1  // Code generated by go-swagger; DO NOT EDIT.
     2  
     3  // Copyright 2020 The go-netbox Authors.
     4  //
     5  // Licensed under the Apache License, Version 2.0 (the "License");
     6  // you may not use this file except in compliance with the License.
     7  // You may obtain a copy of the License at
     8  //
     9  //   http://www.apache.org/licenses/LICENSE-2.0
    10  //
    11  // Unless required by applicable law or agreed to in writing, software
    12  // distributed under the License is distributed on an "AS IS" BASIS,
    13  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    14  // See the License for the specific language governing permissions and
    15  // limitations under the License.
    16  //
    17  
    18  package tenancy
    19  
    20  // This file was generated by the swagger tool.
    21  // Editing this file might prove futile when you re-run the swagger generate command
    22  
    23  import (
    24  	"fmt"
    25  
    26  	"github.com/go-openapi/runtime"
    27  	"github.com/go-openapi/strfmt"
    28  )
    29  
    30  // New creates a new tenancy API client.
    31  func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
    32  	return &Client{transport: transport, formats: formats}
    33  }
    34  
    35  /*
    36  Client for tenancy API
    37  */
    38  type Client struct {
    39  	transport runtime.ClientTransport
    40  	formats   strfmt.Registry
    41  }
    42  
    43  // ClientOption is the option for Client methods
    44  type ClientOption func(*runtime.ClientOperation)
    45  
    46  // ClientService is the interface for Client methods
    47  type ClientService interface {
    48  	TenancyTenantGroupsBulkDelete(params *TenancyTenantGroupsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantGroupsBulkDeleteNoContent, error)
    49  
    50  	TenancyTenantGroupsBulkPartialUpdate(params *TenancyTenantGroupsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantGroupsBulkPartialUpdateOK, error)
    51  
    52  	TenancyTenantGroupsBulkUpdate(params *TenancyTenantGroupsBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantGroupsBulkUpdateOK, error)
    53  
    54  	TenancyTenantGroupsCreate(params *TenancyTenantGroupsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantGroupsCreateCreated, error)
    55  
    56  	TenancyTenantGroupsDelete(params *TenancyTenantGroupsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantGroupsDeleteNoContent, error)
    57  
    58  	TenancyTenantGroupsList(params *TenancyTenantGroupsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantGroupsListOK, error)
    59  
    60  	TenancyTenantGroupsPartialUpdate(params *TenancyTenantGroupsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantGroupsPartialUpdateOK, error)
    61  
    62  	TenancyTenantGroupsRead(params *TenancyTenantGroupsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantGroupsReadOK, error)
    63  
    64  	TenancyTenantGroupsUpdate(params *TenancyTenantGroupsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantGroupsUpdateOK, error)
    65  
    66  	TenancyTenantsBulkDelete(params *TenancyTenantsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantsBulkDeleteNoContent, error)
    67  
    68  	TenancyTenantsBulkPartialUpdate(params *TenancyTenantsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantsBulkPartialUpdateOK, error)
    69  
    70  	TenancyTenantsBulkUpdate(params *TenancyTenantsBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantsBulkUpdateOK, error)
    71  
    72  	TenancyTenantsCreate(params *TenancyTenantsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantsCreateCreated, error)
    73  
    74  	TenancyTenantsDelete(params *TenancyTenantsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantsDeleteNoContent, error)
    75  
    76  	TenancyTenantsList(params *TenancyTenantsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantsListOK, error)
    77  
    78  	TenancyTenantsPartialUpdate(params *TenancyTenantsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantsPartialUpdateOK, error)
    79  
    80  	TenancyTenantsRead(params *TenancyTenantsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantsReadOK, error)
    81  
    82  	TenancyTenantsUpdate(params *TenancyTenantsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantsUpdateOK, error)
    83  
    84  	SetTransport(transport runtime.ClientTransport)
    85  }
    86  
    87  /*
    88    TenancyTenantGroupsBulkDelete tenancy tenant groups bulk delete API
    89  */
    90  func (a *Client) TenancyTenantGroupsBulkDelete(params *TenancyTenantGroupsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantGroupsBulkDeleteNoContent, error) {
    91  	// TODO: Validate the params before sending
    92  	if params == nil {
    93  		params = NewTenancyTenantGroupsBulkDeleteParams()
    94  	}
    95  	op := &runtime.ClientOperation{
    96  		ID:                 "tenancy_tenant-groups_bulk_delete",
    97  		Method:             "DELETE",
    98  		PathPattern:        "/tenancy/tenant-groups/",
    99  		ProducesMediaTypes: []string{"application/json"},
   100  		ConsumesMediaTypes: []string{"application/json"},
   101  		Schemes:            []string{"http"},
   102  		Params:             params,
   103  		Reader:             &TenancyTenantGroupsBulkDeleteReader{formats: a.formats},
   104  		AuthInfo:           authInfo,
   105  		Context:            params.Context,
   106  		Client:             params.HTTPClient,
   107  	}
   108  	for _, opt := range opts {
   109  		opt(op)
   110  	}
   111  
   112  	result, err := a.transport.Submit(op)
   113  	if err != nil {
   114  		return nil, err
   115  	}
   116  	success, ok := result.(*TenancyTenantGroupsBulkDeleteNoContent)
   117  	if ok {
   118  		return success, nil
   119  	}
   120  	// unexpected success response
   121  	// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
   122  	msg := fmt.Sprintf("unexpected success response for tenancy_tenant-groups_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result)
   123  	panic(msg)
   124  }
   125  
   126  /*
   127    TenancyTenantGroupsBulkPartialUpdate tenancy tenant groups bulk partial update API
   128  */
   129  func (a *Client) TenancyTenantGroupsBulkPartialUpdate(params *TenancyTenantGroupsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantGroupsBulkPartialUpdateOK, error) {
   130  	// TODO: Validate the params before sending
   131  	if params == nil {
   132  		params = NewTenancyTenantGroupsBulkPartialUpdateParams()
   133  	}
   134  	op := &runtime.ClientOperation{
   135  		ID:                 "tenancy_tenant-groups_bulk_partial_update",
   136  		Method:             "PATCH",
   137  		PathPattern:        "/tenancy/tenant-groups/",
   138  		ProducesMediaTypes: []string{"application/json"},
   139  		ConsumesMediaTypes: []string{"application/json"},
   140  		Schemes:            []string{"http"},
   141  		Params:             params,
   142  		Reader:             &TenancyTenantGroupsBulkPartialUpdateReader{formats: a.formats},
   143  		AuthInfo:           authInfo,
   144  		Context:            params.Context,
   145  		Client:             params.HTTPClient,
   146  	}
   147  	for _, opt := range opts {
   148  		opt(op)
   149  	}
   150  
   151  	result, err := a.transport.Submit(op)
   152  	if err != nil {
   153  		return nil, err
   154  	}
   155  	success, ok := result.(*TenancyTenantGroupsBulkPartialUpdateOK)
   156  	if ok {
   157  		return success, nil
   158  	}
   159  	// unexpected success response
   160  	// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
   161  	msg := fmt.Sprintf("unexpected success response for tenancy_tenant-groups_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result)
   162  	panic(msg)
   163  }
   164  
   165  /*
   166    TenancyTenantGroupsBulkUpdate tenancy tenant groups bulk update API
   167  */
   168  func (a *Client) TenancyTenantGroupsBulkUpdate(params *TenancyTenantGroupsBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantGroupsBulkUpdateOK, error) {
   169  	// TODO: Validate the params before sending
   170  	if params == nil {
   171  		params = NewTenancyTenantGroupsBulkUpdateParams()
   172  	}
   173  	op := &runtime.ClientOperation{
   174  		ID:                 "tenancy_tenant-groups_bulk_update",
   175  		Method:             "PUT",
   176  		PathPattern:        "/tenancy/tenant-groups/",
   177  		ProducesMediaTypes: []string{"application/json"},
   178  		ConsumesMediaTypes: []string{"application/json"},
   179  		Schemes:            []string{"http"},
   180  		Params:             params,
   181  		Reader:             &TenancyTenantGroupsBulkUpdateReader{formats: a.formats},
   182  		AuthInfo:           authInfo,
   183  		Context:            params.Context,
   184  		Client:             params.HTTPClient,
   185  	}
   186  	for _, opt := range opts {
   187  		opt(op)
   188  	}
   189  
   190  	result, err := a.transport.Submit(op)
   191  	if err != nil {
   192  		return nil, err
   193  	}
   194  	success, ok := result.(*TenancyTenantGroupsBulkUpdateOK)
   195  	if ok {
   196  		return success, nil
   197  	}
   198  	// unexpected success response
   199  	// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
   200  	msg := fmt.Sprintf("unexpected success response for tenancy_tenant-groups_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result)
   201  	panic(msg)
   202  }
   203  
   204  /*
   205    TenancyTenantGroupsCreate tenancy tenant groups create API
   206  */
   207  func (a *Client) TenancyTenantGroupsCreate(params *TenancyTenantGroupsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantGroupsCreateCreated, error) {
   208  	// TODO: Validate the params before sending
   209  	if params == nil {
   210  		params = NewTenancyTenantGroupsCreateParams()
   211  	}
   212  	op := &runtime.ClientOperation{
   213  		ID:                 "tenancy_tenant-groups_create",
   214  		Method:             "POST",
   215  		PathPattern:        "/tenancy/tenant-groups/",
   216  		ProducesMediaTypes: []string{"application/json"},
   217  		ConsumesMediaTypes: []string{"application/json"},
   218  		Schemes:            []string{"http"},
   219  		Params:             params,
   220  		Reader:             &TenancyTenantGroupsCreateReader{formats: a.formats},
   221  		AuthInfo:           authInfo,
   222  		Context:            params.Context,
   223  		Client:             params.HTTPClient,
   224  	}
   225  	for _, opt := range opts {
   226  		opt(op)
   227  	}
   228  
   229  	result, err := a.transport.Submit(op)
   230  	if err != nil {
   231  		return nil, err
   232  	}
   233  	success, ok := result.(*TenancyTenantGroupsCreateCreated)
   234  	if ok {
   235  		return success, nil
   236  	}
   237  	// unexpected success response
   238  	// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
   239  	msg := fmt.Sprintf("unexpected success response for tenancy_tenant-groups_create: API contract not enforced by server. Client expected to get an error, but got: %T", result)
   240  	panic(msg)
   241  }
   242  
   243  /*
   244    TenancyTenantGroupsDelete tenancy tenant groups delete API
   245  */
   246  func (a *Client) TenancyTenantGroupsDelete(params *TenancyTenantGroupsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantGroupsDeleteNoContent, error) {
   247  	// TODO: Validate the params before sending
   248  	if params == nil {
   249  		params = NewTenancyTenantGroupsDeleteParams()
   250  	}
   251  	op := &runtime.ClientOperation{
   252  		ID:                 "tenancy_tenant-groups_delete",
   253  		Method:             "DELETE",
   254  		PathPattern:        "/tenancy/tenant-groups/{id}/",
   255  		ProducesMediaTypes: []string{"application/json"},
   256  		ConsumesMediaTypes: []string{"application/json"},
   257  		Schemes:            []string{"http"},
   258  		Params:             params,
   259  		Reader:             &TenancyTenantGroupsDeleteReader{formats: a.formats},
   260  		AuthInfo:           authInfo,
   261  		Context:            params.Context,
   262  		Client:             params.HTTPClient,
   263  	}
   264  	for _, opt := range opts {
   265  		opt(op)
   266  	}
   267  
   268  	result, err := a.transport.Submit(op)
   269  	if err != nil {
   270  		return nil, err
   271  	}
   272  	success, ok := result.(*TenancyTenantGroupsDeleteNoContent)
   273  	if ok {
   274  		return success, nil
   275  	}
   276  	// unexpected success response
   277  	// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
   278  	msg := fmt.Sprintf("unexpected success response for tenancy_tenant-groups_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result)
   279  	panic(msg)
   280  }
   281  
   282  /*
   283    TenancyTenantGroupsList tenancy tenant groups list API
   284  */
   285  func (a *Client) TenancyTenantGroupsList(params *TenancyTenantGroupsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantGroupsListOK, error) {
   286  	// TODO: Validate the params before sending
   287  	if params == nil {
   288  		params = NewTenancyTenantGroupsListParams()
   289  	}
   290  	op := &runtime.ClientOperation{
   291  		ID:                 "tenancy_tenant-groups_list",
   292  		Method:             "GET",
   293  		PathPattern:        "/tenancy/tenant-groups/",
   294  		ProducesMediaTypes: []string{"application/json"},
   295  		ConsumesMediaTypes: []string{"application/json"},
   296  		Schemes:            []string{"http"},
   297  		Params:             params,
   298  		Reader:             &TenancyTenantGroupsListReader{formats: a.formats},
   299  		AuthInfo:           authInfo,
   300  		Context:            params.Context,
   301  		Client:             params.HTTPClient,
   302  	}
   303  	for _, opt := range opts {
   304  		opt(op)
   305  	}
   306  
   307  	result, err := a.transport.Submit(op)
   308  	if err != nil {
   309  		return nil, err
   310  	}
   311  	success, ok := result.(*TenancyTenantGroupsListOK)
   312  	if ok {
   313  		return success, nil
   314  	}
   315  	// unexpected success response
   316  	// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
   317  	msg := fmt.Sprintf("unexpected success response for tenancy_tenant-groups_list: API contract not enforced by server. Client expected to get an error, but got: %T", result)
   318  	panic(msg)
   319  }
   320  
   321  /*
   322    TenancyTenantGroupsPartialUpdate tenancy tenant groups partial update API
   323  */
   324  func (a *Client) TenancyTenantGroupsPartialUpdate(params *TenancyTenantGroupsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantGroupsPartialUpdateOK, error) {
   325  	// TODO: Validate the params before sending
   326  	if params == nil {
   327  		params = NewTenancyTenantGroupsPartialUpdateParams()
   328  	}
   329  	op := &runtime.ClientOperation{
   330  		ID:                 "tenancy_tenant-groups_partial_update",
   331  		Method:             "PATCH",
   332  		PathPattern:        "/tenancy/tenant-groups/{id}/",
   333  		ProducesMediaTypes: []string{"application/json"},
   334  		ConsumesMediaTypes: []string{"application/json"},
   335  		Schemes:            []string{"http"},
   336  		Params:             params,
   337  		Reader:             &TenancyTenantGroupsPartialUpdateReader{formats: a.formats},
   338  		AuthInfo:           authInfo,
   339  		Context:            params.Context,
   340  		Client:             params.HTTPClient,
   341  	}
   342  	for _, opt := range opts {
   343  		opt(op)
   344  	}
   345  
   346  	result, err := a.transport.Submit(op)
   347  	if err != nil {
   348  		return nil, err
   349  	}
   350  	success, ok := result.(*TenancyTenantGroupsPartialUpdateOK)
   351  	if ok {
   352  		return success, nil
   353  	}
   354  	// unexpected success response
   355  	// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
   356  	msg := fmt.Sprintf("unexpected success response for tenancy_tenant-groups_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result)
   357  	panic(msg)
   358  }
   359  
   360  /*
   361    TenancyTenantGroupsRead tenancy tenant groups read API
   362  */
   363  func (a *Client) TenancyTenantGroupsRead(params *TenancyTenantGroupsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantGroupsReadOK, error) {
   364  	// TODO: Validate the params before sending
   365  	if params == nil {
   366  		params = NewTenancyTenantGroupsReadParams()
   367  	}
   368  	op := &runtime.ClientOperation{
   369  		ID:                 "tenancy_tenant-groups_read",
   370  		Method:             "GET",
   371  		PathPattern:        "/tenancy/tenant-groups/{id}/",
   372  		ProducesMediaTypes: []string{"application/json"},
   373  		ConsumesMediaTypes: []string{"application/json"},
   374  		Schemes:            []string{"http"},
   375  		Params:             params,
   376  		Reader:             &TenancyTenantGroupsReadReader{formats: a.formats},
   377  		AuthInfo:           authInfo,
   378  		Context:            params.Context,
   379  		Client:             params.HTTPClient,
   380  	}
   381  	for _, opt := range opts {
   382  		opt(op)
   383  	}
   384  
   385  	result, err := a.transport.Submit(op)
   386  	if err != nil {
   387  		return nil, err
   388  	}
   389  	success, ok := result.(*TenancyTenantGroupsReadOK)
   390  	if ok {
   391  		return success, nil
   392  	}
   393  	// unexpected success response
   394  	// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
   395  	msg := fmt.Sprintf("unexpected success response for tenancy_tenant-groups_read: API contract not enforced by server. Client expected to get an error, but got: %T", result)
   396  	panic(msg)
   397  }
   398  
   399  /*
   400    TenancyTenantGroupsUpdate tenancy tenant groups update API
   401  */
   402  func (a *Client) TenancyTenantGroupsUpdate(params *TenancyTenantGroupsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantGroupsUpdateOK, error) {
   403  	// TODO: Validate the params before sending
   404  	if params == nil {
   405  		params = NewTenancyTenantGroupsUpdateParams()
   406  	}
   407  	op := &runtime.ClientOperation{
   408  		ID:                 "tenancy_tenant-groups_update",
   409  		Method:             "PUT",
   410  		PathPattern:        "/tenancy/tenant-groups/{id}/",
   411  		ProducesMediaTypes: []string{"application/json"},
   412  		ConsumesMediaTypes: []string{"application/json"},
   413  		Schemes:            []string{"http"},
   414  		Params:             params,
   415  		Reader:             &TenancyTenantGroupsUpdateReader{formats: a.formats},
   416  		AuthInfo:           authInfo,
   417  		Context:            params.Context,
   418  		Client:             params.HTTPClient,
   419  	}
   420  	for _, opt := range opts {
   421  		opt(op)
   422  	}
   423  
   424  	result, err := a.transport.Submit(op)
   425  	if err != nil {
   426  		return nil, err
   427  	}
   428  	success, ok := result.(*TenancyTenantGroupsUpdateOK)
   429  	if ok {
   430  		return success, nil
   431  	}
   432  	// unexpected success response
   433  	// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
   434  	msg := fmt.Sprintf("unexpected success response for tenancy_tenant-groups_update: API contract not enforced by server. Client expected to get an error, but got: %T", result)
   435  	panic(msg)
   436  }
   437  
   438  /*
   439    TenancyTenantsBulkDelete tenancy tenants bulk delete API
   440  */
   441  func (a *Client) TenancyTenantsBulkDelete(params *TenancyTenantsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantsBulkDeleteNoContent, error) {
   442  	// TODO: Validate the params before sending
   443  	if params == nil {
   444  		params = NewTenancyTenantsBulkDeleteParams()
   445  	}
   446  	op := &runtime.ClientOperation{
   447  		ID:                 "tenancy_tenants_bulk_delete",
   448  		Method:             "DELETE",
   449  		PathPattern:        "/tenancy/tenants/",
   450  		ProducesMediaTypes: []string{"application/json"},
   451  		ConsumesMediaTypes: []string{"application/json"},
   452  		Schemes:            []string{"http"},
   453  		Params:             params,
   454  		Reader:             &TenancyTenantsBulkDeleteReader{formats: a.formats},
   455  		AuthInfo:           authInfo,
   456  		Context:            params.Context,
   457  		Client:             params.HTTPClient,
   458  	}
   459  	for _, opt := range opts {
   460  		opt(op)
   461  	}
   462  
   463  	result, err := a.transport.Submit(op)
   464  	if err != nil {
   465  		return nil, err
   466  	}
   467  	success, ok := result.(*TenancyTenantsBulkDeleteNoContent)
   468  	if ok {
   469  		return success, nil
   470  	}
   471  	// unexpected success response
   472  	// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
   473  	msg := fmt.Sprintf("unexpected success response for tenancy_tenants_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result)
   474  	panic(msg)
   475  }
   476  
   477  /*
   478    TenancyTenantsBulkPartialUpdate tenancy tenants bulk partial update API
   479  */
   480  func (a *Client) TenancyTenantsBulkPartialUpdate(params *TenancyTenantsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantsBulkPartialUpdateOK, error) {
   481  	// TODO: Validate the params before sending
   482  	if params == nil {
   483  		params = NewTenancyTenantsBulkPartialUpdateParams()
   484  	}
   485  	op := &runtime.ClientOperation{
   486  		ID:                 "tenancy_tenants_bulk_partial_update",
   487  		Method:             "PATCH",
   488  		PathPattern:        "/tenancy/tenants/",
   489  		ProducesMediaTypes: []string{"application/json"},
   490  		ConsumesMediaTypes: []string{"application/json"},
   491  		Schemes:            []string{"http"},
   492  		Params:             params,
   493  		Reader:             &TenancyTenantsBulkPartialUpdateReader{formats: a.formats},
   494  		AuthInfo:           authInfo,
   495  		Context:            params.Context,
   496  		Client:             params.HTTPClient,
   497  	}
   498  	for _, opt := range opts {
   499  		opt(op)
   500  	}
   501  
   502  	result, err := a.transport.Submit(op)
   503  	if err != nil {
   504  		return nil, err
   505  	}
   506  	success, ok := result.(*TenancyTenantsBulkPartialUpdateOK)
   507  	if ok {
   508  		return success, nil
   509  	}
   510  	// unexpected success response
   511  	// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
   512  	msg := fmt.Sprintf("unexpected success response for tenancy_tenants_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result)
   513  	panic(msg)
   514  }
   515  
   516  /*
   517    TenancyTenantsBulkUpdate tenancy tenants bulk update API
   518  */
   519  func (a *Client) TenancyTenantsBulkUpdate(params *TenancyTenantsBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantsBulkUpdateOK, error) {
   520  	// TODO: Validate the params before sending
   521  	if params == nil {
   522  		params = NewTenancyTenantsBulkUpdateParams()
   523  	}
   524  	op := &runtime.ClientOperation{
   525  		ID:                 "tenancy_tenants_bulk_update",
   526  		Method:             "PUT",
   527  		PathPattern:        "/tenancy/tenants/",
   528  		ProducesMediaTypes: []string{"application/json"},
   529  		ConsumesMediaTypes: []string{"application/json"},
   530  		Schemes:            []string{"http"},
   531  		Params:             params,
   532  		Reader:             &TenancyTenantsBulkUpdateReader{formats: a.formats},
   533  		AuthInfo:           authInfo,
   534  		Context:            params.Context,
   535  		Client:             params.HTTPClient,
   536  	}
   537  	for _, opt := range opts {
   538  		opt(op)
   539  	}
   540  
   541  	result, err := a.transport.Submit(op)
   542  	if err != nil {
   543  		return nil, err
   544  	}
   545  	success, ok := result.(*TenancyTenantsBulkUpdateOK)
   546  	if ok {
   547  		return success, nil
   548  	}
   549  	// unexpected success response
   550  	// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
   551  	msg := fmt.Sprintf("unexpected success response for tenancy_tenants_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result)
   552  	panic(msg)
   553  }
   554  
   555  /*
   556    TenancyTenantsCreate tenancy tenants create API
   557  */
   558  func (a *Client) TenancyTenantsCreate(params *TenancyTenantsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantsCreateCreated, error) {
   559  	// TODO: Validate the params before sending
   560  	if params == nil {
   561  		params = NewTenancyTenantsCreateParams()
   562  	}
   563  	op := &runtime.ClientOperation{
   564  		ID:                 "tenancy_tenants_create",
   565  		Method:             "POST",
   566  		PathPattern:        "/tenancy/tenants/",
   567  		ProducesMediaTypes: []string{"application/json"},
   568  		ConsumesMediaTypes: []string{"application/json"},
   569  		Schemes:            []string{"http"},
   570  		Params:             params,
   571  		Reader:             &TenancyTenantsCreateReader{formats: a.formats},
   572  		AuthInfo:           authInfo,
   573  		Context:            params.Context,
   574  		Client:             params.HTTPClient,
   575  	}
   576  	for _, opt := range opts {
   577  		opt(op)
   578  	}
   579  
   580  	result, err := a.transport.Submit(op)
   581  	if err != nil {
   582  		return nil, err
   583  	}
   584  	success, ok := result.(*TenancyTenantsCreateCreated)
   585  	if ok {
   586  		return success, nil
   587  	}
   588  	// unexpected success response
   589  	// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
   590  	msg := fmt.Sprintf("unexpected success response for tenancy_tenants_create: API contract not enforced by server. Client expected to get an error, but got: %T", result)
   591  	panic(msg)
   592  }
   593  
   594  /*
   595    TenancyTenantsDelete tenancy tenants delete API
   596  */
   597  func (a *Client) TenancyTenantsDelete(params *TenancyTenantsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantsDeleteNoContent, error) {
   598  	// TODO: Validate the params before sending
   599  	if params == nil {
   600  		params = NewTenancyTenantsDeleteParams()
   601  	}
   602  	op := &runtime.ClientOperation{
   603  		ID:                 "tenancy_tenants_delete",
   604  		Method:             "DELETE",
   605  		PathPattern:        "/tenancy/tenants/{id}/",
   606  		ProducesMediaTypes: []string{"application/json"},
   607  		ConsumesMediaTypes: []string{"application/json"},
   608  		Schemes:            []string{"http"},
   609  		Params:             params,
   610  		Reader:             &TenancyTenantsDeleteReader{formats: a.formats},
   611  		AuthInfo:           authInfo,
   612  		Context:            params.Context,
   613  		Client:             params.HTTPClient,
   614  	}
   615  	for _, opt := range opts {
   616  		opt(op)
   617  	}
   618  
   619  	result, err := a.transport.Submit(op)
   620  	if err != nil {
   621  		return nil, err
   622  	}
   623  	success, ok := result.(*TenancyTenantsDeleteNoContent)
   624  	if ok {
   625  		return success, nil
   626  	}
   627  	// unexpected success response
   628  	// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
   629  	msg := fmt.Sprintf("unexpected success response for tenancy_tenants_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result)
   630  	panic(msg)
   631  }
   632  
   633  /*
   634    TenancyTenantsList tenancy tenants list API
   635  */
   636  func (a *Client) TenancyTenantsList(params *TenancyTenantsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantsListOK, error) {
   637  	// TODO: Validate the params before sending
   638  	if params == nil {
   639  		params = NewTenancyTenantsListParams()
   640  	}
   641  	op := &runtime.ClientOperation{
   642  		ID:                 "tenancy_tenants_list",
   643  		Method:             "GET",
   644  		PathPattern:        "/tenancy/tenants/",
   645  		ProducesMediaTypes: []string{"application/json"},
   646  		ConsumesMediaTypes: []string{"application/json"},
   647  		Schemes:            []string{"http"},
   648  		Params:             params,
   649  		Reader:             &TenancyTenantsListReader{formats: a.formats},
   650  		AuthInfo:           authInfo,
   651  		Context:            params.Context,
   652  		Client:             params.HTTPClient,
   653  	}
   654  	for _, opt := range opts {
   655  		opt(op)
   656  	}
   657  
   658  	result, err := a.transport.Submit(op)
   659  	if err != nil {
   660  		return nil, err
   661  	}
   662  	success, ok := result.(*TenancyTenantsListOK)
   663  	if ok {
   664  		return success, nil
   665  	}
   666  	// unexpected success response
   667  	// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
   668  	msg := fmt.Sprintf("unexpected success response for tenancy_tenants_list: API contract not enforced by server. Client expected to get an error, but got: %T", result)
   669  	panic(msg)
   670  }
   671  
   672  /*
   673    TenancyTenantsPartialUpdate tenancy tenants partial update API
   674  */
   675  func (a *Client) TenancyTenantsPartialUpdate(params *TenancyTenantsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantsPartialUpdateOK, error) {
   676  	// TODO: Validate the params before sending
   677  	if params == nil {
   678  		params = NewTenancyTenantsPartialUpdateParams()
   679  	}
   680  	op := &runtime.ClientOperation{
   681  		ID:                 "tenancy_tenants_partial_update",
   682  		Method:             "PATCH",
   683  		PathPattern:        "/tenancy/tenants/{id}/",
   684  		ProducesMediaTypes: []string{"application/json"},
   685  		ConsumesMediaTypes: []string{"application/json"},
   686  		Schemes:            []string{"http"},
   687  		Params:             params,
   688  		Reader:             &TenancyTenantsPartialUpdateReader{formats: a.formats},
   689  		AuthInfo:           authInfo,
   690  		Context:            params.Context,
   691  		Client:             params.HTTPClient,
   692  	}
   693  	for _, opt := range opts {
   694  		opt(op)
   695  	}
   696  
   697  	result, err := a.transport.Submit(op)
   698  	if err != nil {
   699  		return nil, err
   700  	}
   701  	success, ok := result.(*TenancyTenantsPartialUpdateOK)
   702  	if ok {
   703  		return success, nil
   704  	}
   705  	// unexpected success response
   706  	// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
   707  	msg := fmt.Sprintf("unexpected success response for tenancy_tenants_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result)
   708  	panic(msg)
   709  }
   710  
   711  /*
   712    TenancyTenantsRead tenancy tenants read API
   713  */
   714  func (a *Client) TenancyTenantsRead(params *TenancyTenantsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantsReadOK, error) {
   715  	// TODO: Validate the params before sending
   716  	if params == nil {
   717  		params = NewTenancyTenantsReadParams()
   718  	}
   719  	op := &runtime.ClientOperation{
   720  		ID:                 "tenancy_tenants_read",
   721  		Method:             "GET",
   722  		PathPattern:        "/tenancy/tenants/{id}/",
   723  		ProducesMediaTypes: []string{"application/json"},
   724  		ConsumesMediaTypes: []string{"application/json"},
   725  		Schemes:            []string{"http"},
   726  		Params:             params,
   727  		Reader:             &TenancyTenantsReadReader{formats: a.formats},
   728  		AuthInfo:           authInfo,
   729  		Context:            params.Context,
   730  		Client:             params.HTTPClient,
   731  	}
   732  	for _, opt := range opts {
   733  		opt(op)
   734  	}
   735  
   736  	result, err := a.transport.Submit(op)
   737  	if err != nil {
   738  		return nil, err
   739  	}
   740  	success, ok := result.(*TenancyTenantsReadOK)
   741  	if ok {
   742  		return success, nil
   743  	}
   744  	// unexpected success response
   745  	// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
   746  	msg := fmt.Sprintf("unexpected success response for tenancy_tenants_read: API contract not enforced by server. Client expected to get an error, but got: %T", result)
   747  	panic(msg)
   748  }
   749  
   750  /*
   751    TenancyTenantsUpdate tenancy tenants update API
   752  */
   753  func (a *Client) TenancyTenantsUpdate(params *TenancyTenantsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantsUpdateOK, error) {
   754  	// TODO: Validate the params before sending
   755  	if params == nil {
   756  		params = NewTenancyTenantsUpdateParams()
   757  	}
   758  	op := &runtime.ClientOperation{
   759  		ID:                 "tenancy_tenants_update",
   760  		Method:             "PUT",
   761  		PathPattern:        "/tenancy/tenants/{id}/",
   762  		ProducesMediaTypes: []string{"application/json"},
   763  		ConsumesMediaTypes: []string{"application/json"},
   764  		Schemes:            []string{"http"},
   765  		Params:             params,
   766  		Reader:             &TenancyTenantsUpdateReader{formats: a.formats},
   767  		AuthInfo:           authInfo,
   768  		Context:            params.Context,
   769  		Client:             params.HTTPClient,
   770  	}
   771  	for _, opt := range opts {
   772  		opt(op)
   773  	}
   774  
   775  	result, err := a.transport.Submit(op)
   776  	if err != nil {
   777  		return nil, err
   778  	}
   779  	success, ok := result.(*TenancyTenantsUpdateOK)
   780  	if ok {
   781  		return success, nil
   782  	}
   783  	// unexpected success response
   784  	// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
   785  	msg := fmt.Sprintf("unexpected success response for tenancy_tenants_update: API contract not enforced by server. Client expected to get an error, but got: %T", result)
   786  	panic(msg)
   787  }
   788  
   789  // SetTransport changes the transport on the client
   790  func (a *Client) SetTransport(transport runtime.ClientTransport) {
   791  	a.transport = transport
   792  }