Skip to content

Commit

Permalink
Merge pull request #955 from gdbranco/feat/ocm-8260
Browse files Browse the repository at this point in the history
OCM-8260 | feat: bump model to v0.0.374 and include access transparency examples
  • Loading branch information
ciaranRoche authored May 27, 2024
2 parents 44af134 + cde5e92 commit c2ac05e
Show file tree
Hide file tree
Showing 78 changed files with 11,629 additions and 1,487 deletions.
1 change: 1 addition & 0 deletions .github/workflows/check-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ jobs:
- name: Check differences
run: |
git diff --exit-code \
accesstransparency \
accountsmgmt \
addonsmgmt \
authorizations \
Expand Down
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

run:
skip-dirs:
- accesstransparency
- accountsmgmt
- addonsmgmt
- authorizations
Expand Down
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
This document describes the relevant changes between releases of the OCM API
SDK.

## 0.1.421
- Update model version v0.0.374
- Add `CreationTimestamp` and `LastUpdateTimestamp` to `RolePolicyBinding` type
- Add `access_transparency` service

## 0.1.420
- Update model version v0.0.373
- Add `subnet_resource_id` to `Azure` resource
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export PATH := $(LOCAL_BIN_PATH):$(PATH)
export CGO_ENABLED=0

# Details of the model to use:
model_version:=v0.0.373
model_version:=v0.0.374
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down Expand Up @@ -69,6 +69,7 @@ lint:
.PHONY: generate
generate: model metamodel-install goimports-install
rm -rf \
accesstransparency \
accountsmgmt \
addonsmgmt \
authorizations \
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ to the clients for the services that are part of the API.

Contains the `Error` type that is used by the SDK to report errors.

**accesstransparency/v1**

This package contains the types and clients for version 1 of the access
transparency service.

**accountsmgmt/v1**

This package contains the types and clients for version 1 of the accounts
Expand Down
50 changes: 50 additions & 0 deletions accesstransparency/client.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
Copyright (c) 2020 Red Hat, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// IMPORTANT: This file has been generated automatically, refrain from modifying it manually as all
// your changes will be lost when the file is generated again.

package accesstransparency // github.com/openshift-online/ocm-sdk-go/accesstransparency

import (
"net/http"
"path"

v1 "github.com/openshift-online/ocm-sdk-go/accesstransparency/v1"
)

// Client is the client for service 'access_transparency'.
type Client struct {
transport http.RoundTripper
path string
}

// NewClient creates a new client for the service 'access_transparency' using the
// given transport to send the requests and receive the responses.
func NewClient(transport http.RoundTripper, path string) *Client {
client := new(Client)
client.transport = transport
client.path = path
return client
}

// V1 returns a reference to a client for version 'v1'.
func (c *Client) V1() *v1.Client {
return v1.NewClient(
c.transport,
path.Join(c.path, "v1"),
)
}
63 changes: 63 additions & 0 deletions accesstransparency/v1/access_protection_builder.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/*
Copyright (c) 2020 Red Hat, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// IMPORTANT: This file has been generated automatically, refrain from modifying it manually as all
// your changes will be lost when the file is generated again.

package v1 // github.com/openshift-online/ocm-sdk-go/accesstransparency/v1

// AccessProtectionBuilder contains the data and logic needed to build 'access_protection' objects.
//
// Representation of an access protection.
type AccessProtectionBuilder struct {
bitmap_ uint32
enabled bool
}

// NewAccessProtection creates a new builder of 'access_protection' objects.
func NewAccessProtection() *AccessProtectionBuilder {
return &AccessProtectionBuilder{}
}

// Empty returns true if the builder is empty, i.e. no attribute has a value.
func (b *AccessProtectionBuilder) Empty() bool {
return b == nil || b.bitmap_ == 0
}

// Enabled sets the value of the 'enabled' attribute to the given value.
func (b *AccessProtectionBuilder) Enabled(value bool) *AccessProtectionBuilder {
b.enabled = value
b.bitmap_ |= 1
return b
}

// Copy copies the attributes of the given object into this builder, discarding any previous values.
func (b *AccessProtectionBuilder) Copy(object *AccessProtection) *AccessProtectionBuilder {
if object == nil {
return b
}
b.bitmap_ = object.bitmap_
b.enabled = object.enabled
return b
}

// Build creates a 'access_protection' object using the configuration stored in the builder.
func (b *AccessProtectionBuilder) Build() (object *AccessProtection, err error) {
object = new(AccessProtection)
object.bitmap_ = b.bitmap_
object.enabled = b.enabled
return
}
Loading

0 comments on commit c2ac05e

Please sign in to comment.